{
 "id": "hoa-transparency-report",
 "file": "softwiro-hoa-transparency-report.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": 4,
   "settings": [
    {
     "label": "اسم الاتحاد / العمارة / الكمبوند",
     "cell": "B4",
     "value": "اتحاد ملاك عمارة النخيل (مثال)"
    },
    {
     "label": "السنة",
     "cell": "B5",
     "value": 2026
    },
    {
     "label": "الشهر المطلوب في التقرير",
     "cell": "B6",
     "value": "أكتوبر"
    },
    {
     "label": "الرصيد الافتتاحي (أول يوم من أول شهر تسجله)",
     "cell": "B7",
     "value": 25000
    }
   ],
   "results": [
    {
     "label": "رقم الشهر",
     "cell": "B8",
     "formula": "=MATCH(B6,A15:A26,0)"
    },
    {
     "label": "مفتاح الشهر",
     "cell": "B9",
     "formula": "=B5*100+B8"
    },
    {
     "label": "مفتاح الشهر السابق",
     "cell": "B10",
     "formula": "=IF(B8=1,\"\",B9-1)"
    },
    {
     "label": "اسم الشهر السابق",
     "cell": "B11",
     "formula": "=IF(B8=1,\"\",INDEX(A15:A26,B8-1))"
    }
   ]
  },
  {
   "name": "الإيرادات",
   "formula_cells": 1000,
   "record_tables": [
    {
     "header_row": 5,
     "first_record_row": 6,
     "sample_rows_filled": 27,
     "capacity_last_row": 1005,
     "columns": [
      {
       "column": "A",
       "header": "التاريخ",
       "kind": "input",
       "examples": [
        "2026-01-05",
        "2026-01-18",
        "2026-02-05"
       ]
      },
      {
       "column": "B",
       "header": "النوع",
       "kind": "input",
       "examples": [
        "اشتراكات",
        "اشتراكات",
        "اشتراكات"
       ],
       "allowed_values": {
        "from_range": "'الإعدادات'!$C$15:$C$18"
       }
      },
      {
       "column": "C",
       "header": "المبلغ",
       "kind": "input",
       "examples": [
        8000,
        3400,
        8000
       ]
      },
      {
       "column": "D",
       "header": "ملاحظة",
       "kind": "input",
       "examples": [
        "تحصيل أول الشهر",
        "تحصيل باقي الشهر",
        "تحصيل أول الشهر"
       ]
      },
      {
       "column": "E",
       "header": "مفتاح الشهر",
       "kind": "formula",
       "formula_row_1": "=IF(ISNUMBER(A6),YEAR(A6)*100+MONTH(A6),\"\")"
      }
     ]
    }
   ]
  },
  {
   "name": "المصروفات",
   "formula_cells": 2000,
   "record_tables": [
    {
     "header_row": 5,
     "first_record_row": 6,
     "sample_rows_filled": 62,
     "capacity_last_row": 1005,
     "columns": [
      {
       "column": "A",
       "header": "التاريخ",
       "kind": "input",
       "examples": [
        "2026-01-03",
        "2026-01-04",
        "2026-01-08"
       ]
      },
      {
       "column": "B",
       "header": "البند",
       "kind": "input",
       "examples": [
        "نظافة",
        "أمن وحراسة",
        "صيانة المصاعد"
       ],
       "allowed_values": {
        "from_range": "'الإعدادات'!$D$15:$D$22"
       }
      },
      {
       "column": "C",
       "header": "المستفيد",
       "kind": "input",
       "examples": [
        "شركة النظافة (مثال)",
        "مكتب الحراسة (مثال)",
        "شركة المصاعد (مثال)"
       ]
      },
      {
       "column": "D",
       "header": "المبلغ",
       "kind": "input",
       "examples": [
        2500,
        4000,
        3000
       ]
      },
      {
       "column": "E",
       "header": "رقم الفاتورة",
       "kind": "input",
       "examples": [
        "N-01",
        "S-01",
        "L-01"
       ]
      },
      {
       "column": "F",
       "header": "ملاحظة",
       "kind": "input",
       "examples": [
        "نظافة شهرية",
        "حراسة شهرية",
        "صيانة ربع سنوية"
       ]
      },
      {
       "column": "G",
       "header": "مفتاح الشهر",
       "kind": "formula",
       "formula_row_1": "=IF(ISNUMBER(A6),YEAR(A6)*100+MONTH(A6),\"\")"
      },
      {
       "column": "H",
       "header": "تنبيه",
       "kind": "formula",
       "formula_row_1": "=IF(N(D6)=0,\"\",IF(E6&\"\"=\"\",\"بدون فاتورة\",\"\"))"
      }
     ]
    }
   ]
  },
  {
   "name": "بيانات الشهر",
   "formula_cells": 0,
   "record_tables": [
    {
     "header_row": 5,
     "first_record_row": 6,
     "sample_rows_filled": 10,
     "capacity_last_row": 15,
     "columns": [
      {
       "column": "A",
       "header": "الشهر",
       "kind": "input",
       "examples": [
        "يناير",
        "فبراير",
        "مارس"
       ],
       "allowed_values": [
        "يناير",
        "فبراير",
        "مارس",
        "أبريل",
        "مايو",
        "يونيو",
        "يوليو",
        "أغسطس",
        "سبتمبر",
        "أكتوبر",
        "نوفمبر",
        "ديسمبر"
       ]
      },
      {
       "column": "B",
       "header": "وحدات متأخرة",
       "kind": "input",
       "examples": [
        9,
        8,
        10
       ]
      },
      {
       "column": "C",
       "header": "إجمالي المتأخرات",
       "kind": "input",
       "examples": [
        5400,
        4800,
        6300
       ]
      },
      {
       "column": "D",
       "header": "رصيد صندوق الصيانة",
       "kind": "input",
       "examples": [
        30000,
        31000,
        32500
       ]
      },
      {
       "column": "E",
       "header": "طلبات صيانة مفتوحة",
       "kind": "input",
       "examples": [
        4,
        3,
        5
       ]
      },
      {
       "column": "F",
       "header": "طلبات صيانة مغلقة",
       "kind": "input",
       "examples": [
        5,
        6,
        4
       ]
      },
      {
       "column": "G",
       "header": "قرارات منفذة",
       "kind": "input",
       "examples": [
        1,
        2,
        1
       ]
      },
      {
       "column": "H",
       "header": "قرارات معلقة",
       "kind": "input",
       "examples": [
        2,
        1,
        3
       ]
      }
     ]
    }
   ]
  },
  {
   "name": "ملخص السنة",
   "formula_cells": 101,
   "record_tables": [
    {
     "header_row": 5,
     "first_record_row": 6,
     "sample_rows_filled": 13,
     "capacity_last_row": 18,
     "columns": [
      {
       "column": "A",
       "header": "الشهر",
       "kind": "input",
       "examples": [
        "يناير",
        "فبراير",
        "مارس"
       ]
      },
      {
       "column": "B",
       "header": "الإيرادات",
       "kind": "formula",
       "formula_row_1": "=IF((COUNTIFS('الإيرادات'!$E$6:$E$1005,'الإعدادات'!$B$5*100+1)+COUNTIFS('المصروفات'!$G$6:$G$1005,'الإعدادات'!$B$5*100+1))>0,SUMIFS('الإيرادات'!$C$6:$C$1005,'الإيرادات'!$E$6:$E$1005,'الإعدادات'!$B$5*100+1),\"\")"
      },
      {
       "column": "C",
       "header": "المصروفات",
       "kind": "formula",
       "formula_row_1": "=IF((COUNTIFS('الإيرادات'!$E$6:$E$1005,'الإعدادات'!$B$5*100+1)+COUNTIFS('المصروفات'!$G$6:$G$1005,'الإعدادات'!$B$5*100+1))>0,SUMIFS('المصروفات'!$D$6:$D$1005,'المصروفات'!$G$6:$G$1005,'الإعدادات'!$B$5*100+1),\"\")"
      },
      {
       "column": "D",
       "header": "الصافي",
       "kind": "formula",
       "formula_row_1": "=IF(B6=\"\",\"\",B6-C6)"
      },
      {
       "column": "E",
       "header": "رصيد أول الشهر",
       "kind": "formula",
       "formula_row_1": "=IF(B6=\"\",\"\",'الإعدادات'!$B$7)"
      },
      {
       "column": "F",
       "header": "رصيد آخر الشهر",
       "kind": "formula",
       "formula_row_1": "=IF(B6=\"\",\"\",E6+D6)"
      },
      {
       "column": "G",
       "header": "وحدات متأخرة",
       "kind": "formula",
       "formula_row_1": "=IFERROR(INDEX('بيانات الشهر'!$B$6:$B$41,MATCH($A6,'بيانات الشهر'!$A$6:$A$41,0)),\"\")"
      },
      {
       "column": "H",
       "header": "إجمالي المتأخرات",
       "kind": "formula",
       "formula_row_1": "=IFERROR(INDEX('بيانات الشهر'!$C$6:$C$41,MATCH($A6,'بيانات الشهر'!$A$6:$A$41,0)),\"\")"
      },
      {
       "column": "I",
       "header": "رصيد صندوق الصيانة",
       "kind": "formula",
       "formula_row_1": "=IFERROR(INDEX('بيانات الشهر'!$D$6:$D$41,MATCH($A6,'بيانات الشهر'!$A$6:$A$41,0)),\"\")"
      }
     ]
    }
   ]
  },
  {
   "name": "تقرير الشهر",
   "formula_cells": 146,
   "record_tables": [
    {
     "header_row": 7,
     "first_record_row": 8,
     "sample_rows_filled": 0,
     "capacity_last_row": 50,
     "columns": [
      {
       "column": "A",
       "header": "النوع",
       "kind": "formula",
       "formula_row_1": "='الإعدادات'!$C$15&\"\""
      },
      {
       "column": "B",
       "header": "هذا الشهر",
       "kind": "formula",
       "formula_row_1": "=SUMIFS('الإيرادات'!$C$6:$C$1005,'الإيرادات'!$B$6:$B$1005,A8,'الإيرادات'!$E$6:$E$1005,'الإعدادات'!$B$9)"
      },
      {
       "column": "C",
       "header": "نسبة من الإيراد",
       "kind": "formula",
       "formula_row_1": "=IF($B$13=0,\"\",B8/$B$13)"
      },
      {
       "column": "D",
       "header": "الشهر السابق",
       "kind": "formula",
       "formula_row_1": "=IF('الإعدادات'!$B$10=\"\",\"\",SUMIFS('الإيرادات'!$C$6:$C$1005,'الإيرادات'!$B$6:$B$1005,A8,'الإيرادات'!$E$6:$E$1005,'الإعدادات'!$B$10))"
      },
      {
       "column": "E",
       "header": "الفرق",
       "kind": "formula",
       "formula_row_1": "=IF(AND(ISNUMBER(B8),ISNUMBER(D8)),B8-D8,\"\")"
      },
      {
       "column": "F",
       "header": "الاتجاه",
       "kind": "formula",
       "formula_row_1": "=IF(E8=\"\",\"\",IF(E8>0,\"▲ ارتفع\",IF(E8<0,\"▼ انخفض\",\"= ثابت\")))"
      }
     ]
    }
   ]
  },
  {
   "name": "لماذا ما زلت على إكسل؟",
   "formula_cells": 0
  }
 ]
}