{
 "id": "rental-portfolio",
 "file": "softwiro-rental-portfolio.xlsx",
 "title": "شيت إدارة العقارات والوحدات والمستأجرين",
 "language": "ar",
 "direction": "rtl",
 "how_it_works": "White cells are typed input; cells whose kind is \"formula\" are calculated and must not be overwritten. Add one record per row under the header row of a record table, keeping the columns in order.",
 "sheets": [
  {
   "name": "ابدأ هنا",
   "formula_cells": 0
  },
  {
   "name": "الإعدادات",
   "formula_cells": 2,
   "settings": [
    {
     "label": "تاريخ اليوم",
     "cell": "B4",
     "value": "2026-11-07"
    },
    {
     "label": "تنبيه انتهاء العقد قبل (يوم)",
     "cell": "B5",
     "value": 60
    },
    {
     "label": "الشهر المطلوب تقريره (أي يوم فيه)",
     "cell": "B6",
     "value": "2026-11-01"
    }
   ],
   "results": [
    {
     "label": "بداية الشهر",
     "cell": "B7",
     "formula": "=DATE(YEAR(B6),MONTH(B6),1)"
    },
    {
     "label": "بداية الشهر التالي",
     "cell": "B8",
     "formula": "=DATE(YEAR(B6),MONTH(B6)+1,1)"
    }
   ]
  },
  {
   "name": "العقارات",
   "formula_cells": 500,
   "record_tables": [
    {
     "header_row": 5,
     "first_record_row": 6,
     "sample_rows_filled": 3,
     "capacity_last_row": 55,
     "columns": [
      {
       "column": "A",
       "header": "كود العقار",
       "kind": "input",
       "examples": [
        "P01",
        "P02",
        "P03"
       ]
      },
      {
       "column": "B",
       "header": "اسم العقار",
       "kind": "input",
       "examples": [
        "عمارة النيل",
        "برج الياسمين",
        "مجمع الورود التجاري"
       ]
      },
      {
       "column": "C",
       "header": "العنوان",
       "kind": "input",
       "examples": [
        "12 شارع النيل - القاهرة",
        "5 شارع الجامعة - الجيزة",
        "طريق المحور - 6 أكتوبر"
       ]
      },
      {
       "column": "D",
       "header": "ملاحظات",
       "kind": "input",
       "examples": [
        "ملك العائلة",
        "شراكة مع الأخ"
       ]
      },
      {
       "column": "E",
       "header": "الوحدات",
       "kind": "formula",
       "formula_row_1": "=IF(A6&\"\"=\"\",\"\",COUNTIFS('الوحدات'!$B$6:$B$505,A6&\"\"))"
      },
      {
       "column": "F",
       "header": "مؤجرة",
       "kind": "formula",
       "formula_row_1": "=IF(A6&\"\"=\"\",\"\",COUNTIFS('الوحدات'!$B$6:$B$505,A6&\"\",'الوحدات'!$H$6:$H$505,\"مؤجرة\"))"
      },
      {
       "column": "G",
       "header": "شاغرة",
       "kind": "formula",
       "formula_row_1": "=IF(A6&\"\"=\"\",\"\",E6-F6)"
      },
      {
       "column": "H",
       "header": "الإشغال",
       "kind": "formula",
       "formula_row_1": "=IF(A6&\"\"=\"\",\"\",IF(E6=0,0,F6/E6))"
      },
      {
       "column": "I",
       "header": "الإيجار الشهري الحالي",
       "kind": "formula",
       "formula_row_1": "=IF(A6&\"\"=\"\",\"\",SUMIFS('العقود'!$F$6:$F$505,'العقود'!$I$6:$I$505,A6&\"\",'العقود'!$T$6:$T$505,\"?*\"))"
      },
      {
       "column": "J",
       "header": "المستحق حتى اليوم",
       "kind": "formula",
       "formula_row_1": "=IF(A6&\"\"=\"\",\"\",SUMIFS('العقود'!$Q$6:$Q$505,'العقود'!$I$6:$I$505,A6&\"\"))"
      },
      {
       "column": "K",
       "header": "المحصّل",
       "kind": "formula",
       "formula_row_1": "=IF(A6&\"\"=\"\",\"\",SUMIFS('الدفعات'!$C$6:$C$2005,'الدفعات'!$G$6:$G$2005,A6&\"\"))"
      },
      {
       "column": "L",
       "header": "المتأخر",
       "kind": "formula",
       "formula_row_1": "=IF(A6&\"\"=\"\",\"\",SUMIFS('العقود'!$S$6:$S$505,'العقود'!$I$6:$I$505,A6&\"\",'العقود'!$S$6:$S$505,\">0\"))"
      },
      {
       "column": "M",
       "header": "المصروفات",
       "kind": "formula",
       "formula_row_1": "=IF(A6&\"\"=\"\",\"\",SUMIFS('المصروفات'!$D$6:$D$1005,'المصروفات'!$B$6:$B$1005,A6&\"\"))"
      },
      {
       "column": "N",
       "header": "الصافي (محصّل − مصروفات)",
       "kind": "formula",
       "formula_row_1": "=IF(A6&\"\"=\"\",\"\",K6-M6)"
      }
     ]
    }
   ]
  },
  {
   "name": "الوحدات",
   "formula_cells": 2000,
   "record_tables": [
    {
     "header_row": 5,
     "first_record_row": 6,
     "sample_rows_filled": 8,
     "capacity_last_row": 505,
     "columns": [
      {
       "column": "A",
       "header": "كود الوحدة",
       "kind": "input",
       "examples": [
        "P01-01",
        "P01-02",
        "P01-03"
       ]
      },
      {
       "column": "B",
       "header": "كود العقار",
       "kind": "input",
       "examples": [
        "P01",
        "P01",
        "P01"
       ],
       "allowed_values": {
        "from_range": "'العقارات'!$A$6:$A$55"
       }
      },
      {
       "column": "C",
       "header": "رقم / اسم الوحدة",
       "kind": "input",
       "examples": [
        "شقة 1",
        "شقة 2",
        "شقة 3"
       ]
      },
      {
       "column": "D",
       "header": "النوع",
       "kind": "input",
       "examples": [
        "شقة",
        "شقة",
        "شقة"
       ],
       "allowed_values": [
        "شقة",
        "محل",
        "مكتب",
        "مخزن",
        "غرفة",
        "فيلا",
        "أخرى"
       ]
      },
      {
       "column": "E",
       "header": "المساحة م²",
       "kind": "input",
       "examples": [
        120,
        130,
        110
       ]
      },
      {
       "column": "F",
       "header": "الإيجار المقترح",
       "kind": "input",
       "examples": [
        5000,
        5500,
        4500
       ]
      },
      {
       "column": "G",
       "header": "العقار",
       "kind": "formula",
       "formula_row_1": "=IF(A6&\"\"=\"\",\"\",IFERROR(INDEX('العقارات'!$B$6:$B$55,MATCH(B6&\"\",'العقارات'!$A$6:$A$55,0))&\"\",\"عقار غير موجود\"))"
      },
      {
       "column": "H",
       "header": "الحالة",
       "kind": "formula",
       "formula_row_1": "=IF(A6&\"\"=\"\",\"\",IF(COUNTIFS('العقود'!$T$6:$T$505,A6&\"\")>0,\"مؤجرة\",\"شاغرة\"))"
      },
      {
       "column": "I",
       "header": "المستأجر الحالي",
       "kind": "formula",
       "formula_row_1": "=IF(A6&\"\"=\"\",\"\",IFERROR(INDEX('العقود'!$L$6:$L$505,MATCH(A6&\"\",'العقود'!$T$6:$T$505,0))&\"\",\"\"))"
      },
      {
       "column": "J",
       "header": "الإيجار الحالي",
       "kind": "formula",
       "formula_row_1": "=IF(A6&\"\"=\"\",\"\",IFERROR(INDEX('العقود'!$F$6:$F$505,MATCH(A6&\"\",'العقود'!$T$6:$T$505,0)),\"\"))"
      }
     ]
    }
   ]
  },
  {
   "name": "المستأجرون",
   "formula_cells": 1000,
   "record_tables": [
    {
     "header_row": 5,
     "first_record_row": 6,
     "sample_rows_filled": 6,
     "capacity_last_row": 505,
     "columns": [
      {
       "column": "A",
       "header": "كود المستأجر",
       "kind": "input",
       "examples": [
        "T001",
        "T002",
        "T003"
       ]
      },
      {
       "column": "B",
       "header": "الاسم",
       "kind": "input",
       "examples": [
        "أحمد محمد علي",
        "منى سعيد حسن",
        "خالد إبراهيم"
       ]
      },
      {
       "column": "C",
       "header": "الجوال",
       "kind": "input",
       "examples": [
        "01010000001",
        "01010000002",
        "01010000003"
       ]
      },
      {
       "column": "D",
       "header": "رقم الهوية",
       "kind": "input",
       "examples": [
        "29001010000001",
        "28505050000002",
        "29203030000003"
       ]
      },
      {
       "column": "E",
       "header": "ملاحظات",
       "kind": "input",
       "examples": [
        "يدفع مقدمًا",
        "العقد انتهى ولم يُخلِ"
       ]
      },
      {
       "column": "F",
       "header": "عدد العقود",
       "kind": "formula",
       "formula_row_1": "=IF(A6&\"\"=\"\",\"\",COUNTIFS('العقود'!$C$6:$C$505,A6&\"\"))"
      },
      {
       "column": "G",
       "header": "المتأخر عليه",
       "kind": "formula",
       "formula_row_1": "=IF(A6&\"\"=\"\",\"\",SUMIFS('العقود'!$S$6:$S$505,'العقود'!$C$6:$C$505,A6&\"\",'العقود'!$S$6:$S$505,\">0\"))"
      }
     ]
    }
   ]
  },
  {
   "name": "العقود",
   "formula_cells": 7500,
   "record_tables": [
    {
     "header_row": 5,
     "first_record_row": 6,
     "sample_rows_filled": 6,
     "capacity_last_row": 505,
     "columns": [
      {
       "column": "A",
       "header": "رقم العقد",
       "kind": "input",
       "examples": [
        "C001",
        "C002",
        "C003"
       ]
      },
      {
       "column": "B",
       "header": "كود الوحدة",
       "kind": "input",
       "examples": [
        "P01-01",
        "P01-02",
        "P02-01"
       ],
       "allowed_values": {
        "from_range": "'الوحدات'!$A$6:$A$505"
       }
      },
      {
       "column": "C",
       "header": "كود المستأجر",
       "kind": "input",
       "examples": [
        "T001",
        "T002",
        "T003"
       ],
       "allowed_values": {
        "from_range": "'المستأجرون'!$A$6:$A$505"
       }
      },
      {
       "column": "D",
       "header": "بداية العقد",
       "kind": "input",
       "examples": [
        "2026-01-01",
        "2025-12-15",
        "2026-03-01"
       ]
      },
      {
       "column": "E",
       "header": "نهاية العقد",
       "kind": "input",
       "examples": [
        "2026-12-31",
        "2026-12-14",
        "2027-02-28"
       ]
      },
      {
       "column": "F",
       "header": "الإيجار الشهري",
       "kind": "input",
       "examples": [
        5000,
        5500,
        6000
       ]
      },
      {
       "column": "G",
       "header": "التأمين",
       "kind": "input",
       "examples": [
        5000,
        5500,
        6000
       ]
      },
      {
       "column": "H",
       "header": "ملاحظات",
       "kind": "input"
      },
      {
       "column": "I",
       "header": "كود العقار",
       "kind": "formula",
       "formula_row_1": "=IF(A6&\"\"=\"\",\"\",IFERROR(INDEX('الوحدات'!$B$6:$B$505,MATCH(B6&\"\",'الوحدات'!$A$6:$A$505,0))&\"\",\"وحدة غير موجودة\"))"
      },
      {
       "column": "J",
       "header": "العقار",
       "kind": "formula",
       "formula_row_1": "=IF(A6&\"\"=\"\",\"\",IFERROR(INDEX('العقارات'!$B$6:$B$55,MATCH(I6&\"\",'العقارات'!$A$6:$A$55,0))&\"\",\"\"))"
      },
      {
       "column": "K",
       "header": "الوحدة",
       "kind": "formula",
       "formula_row_1": "=IF(A6&\"\"=\"\",\"\",IFERROR(INDEX('الوحدات'!$C$6:$C$505,MATCH(B6&\"\",'الوحدات'!$A$6:$A$505,0))&\"\",\"\"))"
      },
      {
       "column": "L",
       "header": "المستأجر",
       "kind": "formula",
       "formula_row_1": "=IF(A6&\"\"=\"\",\"\",IFERROR(INDEX('المستأجرون'!$B$6:$B$505,MATCH(C6&\"\",'المستأجرون'!$A$6:$A$505,0))&\"\",\"مستأجر غير موجود\"))"
      },
      {
       "column": "M",
       "header": "الجوال",
       "kind": "formula",
       "formula_row_1": "=IF(A6&\"\"=\"\",\"\",IFERROR(INDEX('المستأجرون'!$C$6:$C$505,MATCH(C6&\"\",'المستأجرون'!$A$6:$A$505,0))&\"\",\"\"))"
      },
      {
       "column": "N",
       "header": "الحالة",
       "kind": "formula",
       "formula_row_1": "=IF(A6&\"\"=\"\",\"\",IF(OR(NOT(ISNUMBER(D6)),NOT(ISNUMBER(E6))),\"بيانات ناقصة\",IF(E6<'الإعدادات'!$B$4,\"منتهي\",IF(D6>'الإعدادات'!$B$4,\"لم يبدأ\",IF(E6-'الإعدادات'!$B$4<='الإعدادات'!$B$5,\"ينتهي قريبًا\",\"ساري\")))))"
      },
      {
       "column": "O",
       "header": "الأيام المتبقية",
       "kind": "formula",
       "formula_row_1": "=IF(A6&\"\"=\"\",\"\",IF(ISNUMBER(E6),MAX(0,E6-'الإعدادات'!$B$4),\"\"))"
      },
      {
       "column": "P",
       "header": "الأقساط المستحقة",
       "kind": "formula",
       "formula_row_1": "=IF(A6&\"\"=\"\",\"\",IF(OR(NOT(ISNUMBER(D6)),NOT(ISNUMBER(E6))),\"\",MAX(0,(YEAR(MIN('الإعدادات'!$B$4,E6))-YEAR(D6))*12+MONTH(MIN('الإعدادات'!$B$4,E6))-MONTH(D6)+IF(DAY(MIN('الإعدادات'!$B$4,E6))>=DAY(D6),1,0))))"
      },
      {
       "column": "Q",
       "header": "المستحق حتى اليوم",
       "kind": "formula",
       "formula_row_1": "=IF(A6&\"\"=\"\",\"\",IF(P6=\"\",\"\",P6*N(F6)))"
      },
      {
       "column": "R",
       "header": "المدفوع",
       "kind": "formula",
       "formula_row_1": "=IF(A6&\"\"=\"\",\"\",SUMIFS('الدفعات'!$C$6:$C$2005,'الدفعات'!$B$6:$B$2005,A6&\"\"))"
      },
      {
       "column": "S",
       "header": "المتأخر",
       "kind": "formula",
       "formula_row_1": "=IF(A6&\"\"=\"\",\"\",IF(Q6=\"\",\"\",ROUND(Q6-R6,2)))"
      },
      {
       "column": "T",
       "header": "الوحدة المؤجرة",
       "kind": "formula",
       "formula_row_1": "=IF(A6&\"\"=\"\",\"\",IF(OR(N6=\"ساري\",N6=\"ينتهي قريبًا\"),B6&\"\",\"\"))"
      },
      {
       "column": "U",
       "header": "ترتيب المتأخر",
       "kind": "formula",
       "formula_row_1": "=IF(A6&\"\"=\"\",\"\",IF(N(S6)>0,COUNTIFS($S$6:$S$505,\">\"&S6)+COUNTIFS($S$6:S6,S6),\"\"))"
      },
      {
       "column": "V",
       "header": "أيام للتجديد",
       "kind": "formula",
       "formula_row_1": "=IF(A6&\"\"=\"\",\"\",IF(N6=\"ينتهي قريبًا\",O6,\"\"))"
      },
      {
       "column": "W",
       "header": "ترتيب التجديد",
       "kind": "formula",
       "formula_row_1": "=IF(A6&\"\"=\"\",\"\",IF(ISNUMBER(V6),COUNTIFS($V$6:$V$505,\"<\"&V6)+COUNTIFS($V$6:V6,V6),\"\"))"
      }
     ]
    }
   ]
  },
  {
   "name": "الدفعات",
   "formula_cells": 8000,
   "record_tables": [
    {
     "header_row": 5,
     "first_record_row": 6,
     "sample_rows_filled": 46,
     "capacity_last_row": 2005,
     "columns": [
      {
       "column": "A",
       "header": "تاريخ الدفع",
       "kind": "input",
       "examples": [
        "2025-11-02",
        "2025-12-02",
        "2025-12-15"
       ]
      },
      {
       "column": "B",
       "header": "رقم العقد",
       "kind": "input",
       "examples": [
        "C004",
        "C004",
        "C002"
       ],
       "allowed_values": {
        "from_range": "'العقود'!$A$6:$A$505"
       }
      },
      {
       "column": "C",
       "header": "المبلغ",
       "kind": "input",
       "examples": [
        6500,
        6500,
        5500
       ]
      },
      {
       "column": "D",
       "header": "عن شهر",
       "kind": "input",
       "examples": [
        "2025-11-01",
        "2025-12-01",
        "2025-12-01"
       ]
      },
      {
       "column": "E",
       "header": "طريقة الدفع",
       "kind": "input",
       "examples": [
        "نقدي",
        "نقدي",
        "نقدي"
       ],
       "allowed_values": [
        "نقدي",
        "تحويل بنكي",
        "شيك",
        "فودافون كاش",
        "إنستاباي"
       ]
      },
      {
       "column": "F",
       "header": "رقم إيصال / ملاحظة",
       "kind": "input"
      },
      {
       "column": "G",
       "header": "كود العقار",
       "kind": "formula",
       "formula_row_1": "=IF(B6&\"\"=\"\",\"\",IFERROR(INDEX('العقود'!$I$6:$I$505,MATCH(B6&\"\",'العقود'!$A$6:$A$505,0))&\"\",\"عقد غير موجود\"))"
      },
      {
       "column": "H",
       "header": "العقار",
       "kind": "formula",
       "formula_row_1": "=IF(B6&\"\"=\"\",\"\",IFERROR(INDEX('العقود'!$J$6:$J$505,MATCH(B6&\"\",'العقود'!$A$6:$A$505,0))&\"\",\"عقد غير موجود\"))"
      },
      {
       "column": "I",
       "header": "الوحدة",
       "kind": "formula",
       "formula_row_1": "=IF(B6&\"\"=\"\",\"\",IFERROR(INDEX('العقود'!$K$6:$K$505,MATCH(B6&\"\",'العقود'!$A$6:$A$505,0))&\"\",\"عقد غير موجود\"))"
      },
      {
       "column": "J",
       "header": "المستأجر",
       "kind": "formula",
       "formula_row_1": "=IF(B6&\"\"=\"\",\"\",IFERROR(INDEX('العقود'!$L$6:$L$505,MATCH(B6&\"\",'العقود'!$A$6:$A$505,0))&\"\",\"عقد غير موجود\"))"
      }
     ]
    }
   ]
  },
  {
   "name": "المصروفات",
   "formula_cells": 1000,
   "record_tables": [
    {
     "header_row": 5,
     "first_record_row": 6,
     "sample_rows_filled": 5,
     "capacity_last_row": 1005,
     "columns": [
      {
       "column": "A",
       "header": "التاريخ",
       "kind": "input",
       "examples": [
        "2026-09-14",
        "2026-10-05",
        "2026-10-20"
       ]
      },
      {
       "column": "B",
       "header": "كود العقار",
       "kind": "input",
       "examples": [
        "P01",
        "P02",
        "P03"
       ],
       "allowed_values": {
        "from_range": "'العقارات'!$A$6:$A$55"
       }
      },
      {
       "column": "C",
       "header": "النوع",
       "kind": "input",
       "examples": [
        "صيانة",
        "كهرباء",
        "حراسة ونظافة"
       ],
       "allowed_values": [
        "صيانة",
        "كهرباء",
        "مياه",
        "غاز",
        "ضرائب",
        "حراسة ونظافة",
        "عمولة",
        "أخرى"
       ]
      },
      {
       "column": "D",
       "header": "المبلغ",
       "kind": "input",
       "examples": [
        1200,
        650,
        1500
       ]
      },
      {
       "column": "E",
       "header": "ملاحظة",
       "kind": "input",
       "examples": [
        "سباكة",
        "كهرباء السلالم",
        "مصعد"
       ]
      },
      {
       "column": "F",
       "header": "العقار",
       "kind": "formula",
       "formula_row_1": "=IF(B6&\"\"=\"\",\"\",IFERROR(INDEX('العقارات'!$B$6:$B$55,MATCH(B6&\"\",'العقارات'!$A$6:$A$55,0))&\"\",\"عقار غير موجود\"))"
      }
     ]
    }
   ]
  },
  {
   "name": "المتأخرون",
   "formula_cells": 402,
   "record_tables": [
    {
     "header_row": 6,
     "first_record_row": 7,
     "sample_rows_filled": 0,
     "capacity_last_row": 56,
     "columns": [
      {
       "column": "A",
       "header": "م",
       "kind": "formula",
       "formula_row_1": "=IF(1<=$B$4,1,\"\")"
      },
      {
       "column": "B",
       "header": "العقد",
       "kind": "formula",
       "formula_row_1": "=IF($A7=\"\",\"\",INDEX('العقود'!$A$6:$A$505,MATCH($A7,'العقود'!$U$6:$U$505,0))&\"\")"
      },
      {
       "column": "C",
       "header": "المستأجر",
       "kind": "formula",
       "formula_row_1": "=IF($A7=\"\",\"\",INDEX('العقود'!$L$6:$L$505,MATCH($A7,'العقود'!$U$6:$U$505,0))&\"\")"
      },
      {
       "column": "D",
       "header": "الجوال",
       "kind": "formula",
       "formula_row_1": "=IF($A7=\"\",\"\",INDEX('العقود'!$M$6:$M$505,MATCH($A7,'العقود'!$U$6:$U$505,0))&\"\")"
      },
      {
       "column": "E",
       "header": "العقار",
       "kind": "formula",
       "formula_row_1": "=IF($A7=\"\",\"\",INDEX('العقود'!$J$6:$J$505,MATCH($A7,'العقود'!$U$6:$U$505,0))&\"\")"
      },
      {
       "column": "F",
       "header": "الوحدة",
       "kind": "formula",
       "formula_row_1": "=IF($A7=\"\",\"\",INDEX('العقود'!$K$6:$K$505,MATCH($A7,'العقود'!$U$6:$U$505,0))&\"\")"
      },
      {
       "column": "G",
       "header": "أشهر متأخرة",
       "kind": "formula",
       "formula_row_1": "=IF($A7=\"\",\"\",ROUND(INDEX('العقود'!$S$6:$S$505,MATCH($A7,'العقود'!$U$6:$U$505,0))/INDEX('العقود'!$F$6:$F$505,MATCH($A7,'العقود'!$U$6:$U$505,0)),1))"
      },
      {
       "column": "H",
       "header": "المتأخر",
       "kind": "formula",
       "formula_row_1": "=IF($A7=\"\",\"\",INDEX('العقود'!$S$6:$S$505,MATCH($A7,'العقود'!$U$6:$U$505,0)))"
      }
     ]
    }
   ],
   "results": [
    {
     "label": "عدد العقود المتأخرة",
     "cell": "B4",
     "formula": "=COUNTIF('العقود'!$S$6:$S$505,\">0\")"
    },
    {
     "label": "إجمالي المتأخر",
     "cell": "B5",
     "formula": "=SUMIF('العقود'!$S$6:$S$505,\">0\")"
    }
   ]
  },
  {
   "name": "التجديدات",
   "formula_cells": 451,
   "record_tables": [
    {
     "header_row": 6,
     "first_record_row": 7,
     "sample_rows_filled": 0,
     "capacity_last_row": 56,
     "columns": [
      {
       "column": "A",
       "header": "م",
       "kind": "formula",
       "formula_row_1": "=IF(1<=$B$4,1,\"\")"
      },
      {
       "column": "B",
       "header": "العقد",
       "kind": "formula",
       "formula_row_1": "=IF($A7=\"\",\"\",INDEX('العقود'!$A$6:$A$505,MATCH($A7,'العقود'!$W$6:$W$505,0))&\"\")"
      },
      {
       "column": "C",
       "header": "المستأجر",
       "kind": "formula",
       "formula_row_1": "=IF($A7=\"\",\"\",INDEX('العقود'!$L$6:$L$505,MATCH($A7,'العقود'!$W$6:$W$505,0))&\"\")"
      },
      {
       "column": "D",
       "header": "الجوال",
       "kind": "formula",
       "formula_row_1": "=IF($A7=\"\",\"\",INDEX('العقود'!$M$6:$M$505,MATCH($A7,'العقود'!$W$6:$W$505,0))&\"\")"
      },
      {
       "column": "E",
       "header": "العقار",
       "kind": "formula",
       "formula_row_1": "=IF($A7=\"\",\"\",INDEX('العقود'!$J$6:$J$505,MATCH($A7,'العقود'!$W$6:$W$505,0))&\"\")"
      },
      {
       "column": "F",
       "header": "الوحدة",
       "kind": "formula",
       "formula_row_1": "=IF($A7=\"\",\"\",INDEX('العقود'!$K$6:$K$505,MATCH($A7,'العقود'!$W$6:$W$505,0))&\"\")"
      },
      {
       "column": "G",
       "header": "تاريخ النهاية",
       "kind": "formula",
       "formula_row_1": "=IF($A7=\"\",\"\",INDEX('العقود'!$E$6:$E$505,MATCH($A7,'العقود'!$W$6:$W$505,0)))"
      },
      {
       "column": "H",
       "header": "الأيام المتبقية",
       "kind": "formula",
       "formula_row_1": "=IF($A7=\"\",\"\",INDEX('العقود'!$O$6:$O$505,MATCH($A7,'العقود'!$W$6:$W$505,0)))"
      },
      {
       "column": "I",
       "header": "الإيجار الحالي",
       "kind": "formula",
       "formula_row_1": "=IF($A7=\"\",\"\",INDEX('العقود'!$F$6:$F$505,MATCH($A7,'العقود'!$W$6:$W$505,0)))"
      }
     ]
    }
   ],
   "results": [
    {
     "label": "عقود تنتهي قريبًا",
     "cell": "B4",
     "formula": "=COUNTIF('العقود'!$N$6:$N$505,\"ينتهي قريبًا\")"
    }
   ]
  },
  {
   "name": "التقرير الشهري",
   "formula_cells": 356,
   "record_tables": [
    {
     "header_row": 6,
     "first_record_row": 7,
     "sample_rows_filled": 51,
     "capacity_last_row": 57,
     "columns": [
      {
       "column": "A",
       "header": "كود العقار",
       "kind": "input",
       "examples": [
        "الإجمالي",
        "=IF('العقارات'!A6&\"\"=\"\",\"\",'العقارات'!A6)",
        "=IF('العقارات'!A7&\"\"=\"\",\"\",'العقارات'!A7)"
       ]
      },
      {
       "column": "B",
       "header": "العقار",
       "kind": "input",
       "examples": [
        "=IF($A8=\"\",\"\",'العقارات'!B6&\"\")",
        "=IF($A9=\"\",\"\",'العقارات'!B7&\"\")",
        "=IF($A10=\"\",\"\",'العقارات'!B8&\"\")"
       ]
      },
      {
       "column": "C",
       "header": "الإيجار المتوقع للشهر",
       "kind": "formula",
       "formula_row_1": "=SUM(C8:C57)"
      },
      {
       "column": "D",
       "header": "المحصّل في الشهر",
       "kind": "formula",
       "formula_row_1": "=SUM(D8:D57)"
      },
      {
       "column": "E",
       "header": "نسبة التحصيل",
       "kind": "formula",
       "formula_row_1": "=IF(C7=0,\"\",D7/C7)"
      },
      {
       "column": "F",
       "header": "المصروفات",
       "kind": "formula",
       "formula_row_1": "=SUM(F8:F57)"
      },
      {
       "column": "G",
       "header": "الصافي",
       "kind": "formula",
       "formula_row_1": "=SUM(G8:G57)"
      }
     ]
    }
   ],
   "results": [
    {
     "label": "الشهر",
     "cell": "B4",
     "formula": "='الإعدادات'!$B$7"
    }
   ]
  },
  {
   "name": "الملخص",
   "formula_cells": 16,
   "results": [
    {
     "label": "عدد العقارات",
     "cell": "B5",
     "formula": "=COUNTIF('العقارات'!$A$6:$A$55,\"?*\")"
    },
    {
     "label": "عدد الوحدات",
     "cell": "B6",
     "formula": "=COUNTIF('الوحدات'!$A$6:$A$505,\"?*\")"
    },
    {
     "label": "وحدات مؤجرة",
     "cell": "B7",
     "formula": "=COUNTIF('الوحدات'!$H$6:$H$505,\"مؤجرة\")"
    },
    {
     "label": "وحدات شاغرة",
     "cell": "B8",
     "formula": "=COUNTIF('الوحدات'!$H$6:$H$505,\"شاغرة\")"
    },
    {
     "label": "نسبة الإشغال",
     "cell": "B9",
     "formula": "=IF(B6=0,\"\",B7/B6)"
    },
    {
     "label": "عقود سارية",
     "cell": "B12",
     "formula": "=COUNTIF('العقود'!$N$6:$N$505,\"ساري\")"
    },
    {
     "label": "عقود تنتهي قريبًا",
     "cell": "B13",
     "formula": "=COUNTIF('العقود'!$N$6:$N$505,\"ينتهي قريبًا\")"
    },
    {
     "label": "عقود منتهية",
     "cell": "B14",
     "formula": "=COUNTIF('العقود'!$N$6:$N$505,\"منتهي\")"
    },
    {
     "label": "الإيجار الشهري الحالي (عقود سارية)",
     "cell": "B17",
     "formula": "=SUMIFS('العقود'!$F$6:$F$505,'العقود'!$T$6:$T$505,\"?*\")"
    },
    {
     "label": "المستحق حتى اليوم",
     "cell": "B18",
     "formula": "=SUM('العقود'!$Q$6:$Q$505)"
    },
    {
     "label": "المحصّل",
     "cell": "B19",
     "formula": "=SUM('الدفعات'!$C$6:$C$2005)"
    },
    {
     "label": "المتأخر على المستأجرين",
     "cell": "B20",
     "formula": "=SUMIF('العقود'!$S$6:$S$505,\">0\")"
    },
    {
     "label": "تأمينات العقود السارية",
     "cell": "B21",
     "formula": "=SUMIFS('العقود'!$G$6:$G$505,'العقود'!$T$6:$T$505,\"?*\")"
    },
    {
     "label": "المصروفات",
     "cell": "B22",
     "formula": "=SUM('المصروفات'!$D$6:$D$1005)"
    },
    {
     "label": "الصافي (محصّل − مصروفات)",
     "cell": "B23",
     "formula": "=B19-B22"
    },
    {
     "label": "العقار الأعلى صافيًا",
     "cell": "B24",
     "formula": "=IFERROR(INDEX('العقارات'!$B$6:$B$55,MATCH(MAX('العقارات'!$N$6:$N$55),'العقارات'!$N$6:$N$55,0))&\"\",\"\")"
    }
   ]
  },
  {
   "name": "لماذا ما زلت على إكسل؟",
   "formula_cells": 0
  }
 ]
}