{
 "id": "hoa-reserve-fund",
 "file": "softwiro-hoa-reserve-fund.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": 0,
   "settings": [
    {
     "label": "تاريخ اليوم",
     "cell": "B4",
     "value": "2026-11-01"
    },
    {
     "label": "الرصيد الافتتاحي للصندوق",
     "cell": "B5",
     "value": 120000
    },
    {
     "label": "الاشتراك الشهري المخصص للصندوق",
     "cell": "B6",
     "value": 24000
    },
    {
     "label": "الحد الأدنى الآمن للرصيد",
     "cell": "B7",
     "value": 50000
    }
   ]
  },
  {
   "name": "الحركات",
   "formula_cells": 2002,
   "record_tables": [
    {
     "header_row": 5,
     "first_record_row": 6,
     "sample_rows_filled": 15,
     "capacity_last_row": 1005,
     "columns": [
      {
       "column": "A",
       "header": "التاريخ",
       "kind": "input",
       "examples": [
        "2026-01-31",
        "2026-02-28",
        "2026-03-15"
       ]
      },
      {
       "column": "B",
       "header": "النوع",
       "kind": "input",
       "examples": [
        "إيداع",
        "إيداع",
        "سحب"
       ],
       "allowed_values": [
        "إيداع",
        "سحب"
       ]
      },
      {
       "column": "C",
       "header": "البيان",
       "kind": "input",
       "examples": [
        "اشتراكات الصيانة - يناير",
        "اشتراكات الصيانة - فبراير",
        "إصلاح مضخة المياه"
       ]
      },
      {
       "column": "D",
       "header": "المبلغ",
       "kind": "input",
       "examples": [
        24000,
        23500,
        9500
       ]
      },
      {
       "column": "E",
       "header": "المصدر / المستفيد",
       "kind": "input",
       "examples": [
        "الملاك",
        "الملاك",
        "مقاول سباكة"
       ]
      },
      {
       "column": "F",
       "header": "رقم القرار أو الإيصال",
       "kind": "input",
       "examples": [
        "إيصال 101",
        "إيصال 102",
        "قرار 01/2026"
       ]
      },
      {
       "column": "G",
       "header": "الأثر على الرصيد",
       "kind": "formula",
       "formula_row_1": "=IF(OR(NOT(ISNUMBER(D6)),B6&\"\"=\"\"),\"\",IF(B6=\"إيداع\",D6,-D6))"
      },
      {
       "column": "H",
       "header": "الرصيد الجاري",
       "kind": "formula",
       "formula_row_1": "=IF(G6=\"\",\"\",$B$3+SUM($G$6:G6))"
      }
     ]
    }
   ],
   "results": [
    {
     "label": "الرصيد الافتتاحي",
     "cell": "B3",
     "formula": "='الإعدادات'!$B$5"
    }
   ]
  },
  {
   "name": "المشروعات",
   "formula_cells": 1000,
   "record_tables": [
    {
     "header_row": 5,
     "first_record_row": 6,
     "sample_rows_filled": 6,
     "capacity_last_row": 205,
     "columns": [
      {
       "column": "A",
       "header": "المشروع",
       "kind": "input",
       "examples": [
        "دهان واجهات المبنى",
        "استبدال المصعد",
        "تغيير خزان المياه العلوي"
       ]
      },
      {
       "column": "B",
       "header": "التكلفة التقديرية",
       "kind": "input",
       "examples": [
        180000,
        650000,
        90000
       ]
      },
      {
       "column": "C",
       "header": "السنة المستهدفة",
       "kind": "input",
       "examples": [
        2027,
        2030,
        2026
       ]
      },
      {
       "column": "D",
       "header": "المدخر له من الصندوق",
       "kind": "input",
       "examples": [
        40000,
        30000,
        60000
       ]
      },
      {
       "column": "E",
       "header": "الأشهر المتبقية",
       "kind": "formula",
       "formula_row_1": "=IF(OR(A6&\"\"=\"\",NOT(ISNUMBER(C6))),\"\",MAX(0,(C6-YEAR('الإعدادات'!$B$4))*12+12-MONTH('الإعدادات'!$B$4)+1))"
      },
      {
       "column": "F",
       "header": "المتبقي تجميعه",
       "kind": "formula",
       "formula_row_1": "=IF(OR(A6&\"\"=\"\",NOT(ISNUMBER(B6))),\"\",MAX(0,ROUND(B6-N(D6),2)))"
      },
      {
       "column": "G",
       "header": "المطلوب شهريًا",
       "kind": "formula",
       "formula_row_1": "=IF(F6=\"\",\"\",IF(F6=0,0,IF(AND(ISNUMBER(E6),E6>0),ROUND(F6/E6,2),\"\")))"
      },
      {
       "column": "H",
       "header": "نسبة الادخار",
       "kind": "formula",
       "formula_row_1": "=IF(OR(F6=\"\",N(B6)=0),\"\",MIN(1,N(D6)/B6))"
      },
      {
       "column": "I",
       "header": "الحالة",
       "kind": "formula",
       "formula_row_1": "=IF(F6=\"\",\"\",IF(NOT(ISNUMBER(E6)),\"بيانات ناقصة\",IF(F6=0,\"مكتمل\",IF(E6=0,\"فات الموعد\",\"قيد التجميع\"))))"
      }
     ]
    }
   ]
  },
  {
   "name": "الملخص",
   "formula_cells": 24,
   "record_tables": [
    {
     "header_row": 27,
     "first_record_row": 28,
     "sample_rows_filled": 3,
     "capacity_last_row": 30,
     "columns": [
      {
       "column": "A",
       "header": "الحالة",
       "kind": "input",
       "examples": [
        "قيد التجميع",
        "فات الموعد",
        "مكتمل"
       ]
      },
      {
       "column": "B",
       "header": "عدد المشروعات",
       "kind": "formula",
       "formula_row_1": "=COUNTIF('المشروعات'!$I$6:$I$205,A28)"
      },
      {
       "column": "C",
       "header": "المتبقي تجميعه",
       "kind": "formula",
       "formula_row_1": "=SUMIFS('المشروعات'!$F$6:$F$205,'المشروعات'!$I$6:$I$205,A28)"
      }
     ]
    }
   ],
   "results": [
    {
     "label": "الرصيد الافتتاحي",
     "cell": "B5",
     "formula": "='الإعدادات'!$B$5"
    },
    {
     "label": "إجمالي الإيداعات",
     "cell": "B6",
     "formula": "=SUMIFS('الحركات'!$D$6:$D$1005,'الحركات'!$B$6:$B$1005,\"إيداع\")"
    },
    {
     "label": "إجمالي السحوبات",
     "cell": "B7",
     "formula": "=SUMIFS('الحركات'!$D$6:$D$1005,'الحركات'!$B$6:$B$1005,\"سحب\")"
    },
    {
     "label": "الرصيد الحالي",
     "cell": "B8",
     "formula": "=B5+B6-B7"
    },
    {
     "label": "عدد الحركات",
     "cell": "B9",
     "formula": "=COUNT('الحركات'!$D$6:$D$1005)"
    },
    {
     "label": "تاريخ آخر حركة",
     "cell": "B10",
     "formula": "=IF(B9=0,\"\",MAX('الحركات'!$A$6:$A$1005))"
    },
    {
     "label": "الحد الأدنى الآمن للرصيد",
     "cell": "B11",
     "formula": "='الإعدادات'!$B$7"
    },
    {
     "label": "حالة الرصيد",
     "cell": "B12",
     "formula": "=IF(B8<B11,\"الرصيد أقل من الحد الأدنى الآمن\",\"الرصيد فوق الحد الأدنى الآمن\")"
    },
    {
     "label": "عدد المشروعات",
     "cell": "B15",
     "formula": "=COUNTIF('المشروعات'!$A$6:$A$205,\"?*\")"
    },
    {
     "label": "إجمالي التكلفة التقديرية",
     "cell": "B16",
     "formula": "=SUM('المشروعات'!$B$6:$B$205)"
    },
    {
     "label": "المدخر للمشروعات من الصندوق",
     "cell": "B17",
     "formula": "=SUM('المشروعات'!$D$6:$D$205)"
    },
    {
     "label": "المتبقي تجميعه",
     "cell": "B18",
     "formula": "=SUM('المشروعات'!$F$6:$F$205)"
    },
    {
     "label": "المطلوب شهريًا لكل المشروعات",
     "cell": "B19",
     "formula": "=SUM('المشروعات'!$G$6:$G$205)"
    },
    {
     "label": "الاشتراك الشهري المخصص للصندوق",
     "cell": "B20",
     "formula": "='الإعدادات'!$B$6"
    },
    {
     "label": "الفجوة الشهرية",
     "cell": "B21",
     "formula": "=MAX(0,B19-B20)"
    },
    {
     "label": "الرصيد غير المخصص لمشروع",
     "cell": "B22",
     "formula": "=B8-B17"
    },
    {
     "label": "نسبة تغطية الرصيد لتكلفة المشروعات",
     "cell": "B23",
     "formula": "=IF(B16=0,\"\",MIN(1,B8/B16))"
    },
    {
     "label": "تنبيه",
     "cell": "B24",
     "formula": "=IF(B22<0,\"المخصص للمشروعات أكبر من رصيد الصندوق\",IF(B21>0,\"الاشتراك الشهري لا يكفي لتجميع المشروعات في مواعيدها\",\"الاشتراك الشهري يغطي المشروعات في مواعيدها\"))"
    }
   ]
  },
  {
   "name": "لماذا ما زلت على إكسل؟",
   "formula_cells": 0
  }
 ]
}