{
 "id": "project-budget-tracker",
 "file": "softwiro-project-budget-tracker.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": "تشطيب فيلا التجمع - الدور الأول"
    },
    {
     "label": "تاريخ المتابعة (اليوم)",
     "cell": "B5",
     "value": "2026-11-13"
    },
    {
     "label": "تاريخ بداية المشروع (أي يوم من أول شهر)",
     "cell": "B6",
     "value": "2026-10-01"
    },
    {
     "label": "احتياطي الطوارئ (مبلغ)",
     "cell": "B8",
     "value": 60000
    },
    {
     "label": "نبّهني عند صرف/التزام نسبة من ميزانية البند",
     "cell": "B9",
     "value": 0.9
    },
    {
     "label": "الفئة",
     "cell": "B13",
     "value": "ملاحظة"
    }
   ],
   "results": [
    {
     "label": "أول يوم في شهر البداية",
     "cell": "B7",
     "formula": "=DATE(YEAR(B6),MONTH(B6),1)"
    },
    {
     "label": "أول يوم في شهر المتابعة",
     "cell": "B10",
     "formula": "=DATE(YEAR(B5),MONTH(B5),1)"
    }
   ]
  },
  {
   "name": "البنود",
   "formula_cells": 1100,
   "record_tables": [
    {
     "header_row": 5,
     "first_record_row": 6,
     "sample_rows_filled": 12,
     "capacity_last_row": 105,
     "columns": [
      {
       "column": "A",
       "header": "الكود",
       "kind": "input",
       "examples": [
        "B01",
        "B02",
        "E01"
       ]
      },
      {
       "column": "B",
       "header": "الفئة",
       "kind": "input",
       "examples": [
        "أعمال مدنية",
        "أعمال مدنية",
        "كهرباء"
       ],
       "allowed_values": {
        "from_range": "'الإعدادات'!$A$14:$A$21"
       }
      },
      {
       "column": "C",
       "header": "البند",
       "kind": "input",
       "examples": [
        "تكسير وبناء قواطع",
        "لياسة جدران وأسقف",
        "نقاط كهرباء وتمديدات"
       ]
      },
      {
       "column": "D",
       "header": "الوحدة",
       "kind": "input",
       "examples": [
        "م2",
        "م2",
        "نقطة"
       ]
      },
      {
       "column": "E",
       "header": "الكمية",
       "kind": "input",
       "examples": [
        120,
        600,
        85
       ]
      },
      {
       "column": "F",
       "header": "سعر الوحدة",
       "kind": "input",
       "examples": [
        450,
        180,
        650
       ]
      },
      {
       "column": "G",
       "header": "الميزانية",
       "kind": "formula",
       "formula_row_1": "=IF(A6&\"\"=\"\",\"\",ROUND(N(E6)*N(F6),2))"
      },
      {
       "column": "H",
       "header": "شهر البدء",
       "kind": "input",
       "examples": [
        1,
        2,
        1
       ]
      },
      {
       "column": "I",
       "header": "شهر الانتهاء",
       "kind": "input",
       "examples": [
        2,
        3,
        3
       ]
      },
      {
       "column": "J",
       "header": "نسبة الإنجاز",
       "kind": "input",
       "examples": [
        1,
        0.9,
        0.7
       ]
      },
      {
       "column": "K",
       "header": "الملتزم به",
       "kind": "formula",
       "formula_row_1": "=IF(A6&\"\"=\"\",\"\",ROUND(SUMIFS('الالتزامات'!$E$6:$E$505,'الالتزامات'!$C$6:$C$505,A6&\"\")+SUMIFS('المدفوعات'!$D$6:$D$1505,'المدفوعات'!$F$6:$F$1505,A6&\"\",'المدفوعات'!$H$6:$H$1505,\"دفع مباشر\"),2))"
      },
      {
       "column": "L",
       "header": "المدفوع",
       "kind": "formula",
       "formula_row_1": "=IF(A6&\"\"=\"\",\"\",ROUND(SUMIFS('المدفوعات'!$D$6:$D$1505,'المدفوعات'!$F$6:$F$1505,A6&\"\"),2))"
      },
      {
       "column": "M",
       "header": "متبقٍ للدفع على الالتزام",
       "kind": "formula",
       "formula_row_1": "=IF(A6&\"\"=\"\",\"\",MAX(0,ROUND(K6-L6,2)))"
      },
      {
       "column": "N",
       "header": "ميزانية غير ملتزمة",
       "kind": "formula",
       "formula_row_1": "=IF(A6&\"\"=\"\",\"\",ROUND(G6-K6,2))"
      },
      {
       "column": "O",
       "header": "القيمة المنجزة",
       "kind": "formula",
       "formula_row_1": "=IF(A6&\"\"=\"\",\"\",ROUND(G6*MIN(1,N(J6)),2))"
      },
      {
       "column": "P",
       "header": "التوقع عند الإنجاز",
       "kind": "formula",
       "formula_row_1": "=IF(A6&\"\"=\"\",\"\",ROUND(IF(N(J6)>=1,MAX(K6,L6),MAX(G6,K6,L6,IF(AND(N(J6)>0,COUNTIFS('الالتزامات'!$C$6:$C$505,A6&\"\")=0),L6/J6,0))),2))"
      },
      {
       "column": "Q",
       "header": "التجاوز المتوقع",
       "kind": "formula",
       "formula_row_1": "=IF(A6&\"\"=\"\",\"\",ROUND(P6-G6,2))"
      },
      {
       "column": "R",
       "header": "الحالة",
       "kind": "formula",
       "formula_row_1": "=IF(A6&\"\"=\"\",\"\",IF(MAX(K6,L6)>G6,\"تجاوز\",IF(N(J6)>=1,\"منجز\",IF(P6>G6,\"تجاوز متوقع\",IF(AND(G6>0,MAX(K6,L6)>=G6*'الإعدادات'!$B$9),\"قرب الحد\",\"ضمن الميزانية\")))))"
      },
      {
       "column": "S",
       "header": "خطة الشهر",
       "kind": "formula",
       "formula_row_1": "=IF(A6&\"\"=\"\",\"\",IF(AND(ISNUMBER(H6),ISNUMBER(I6),H6>=1,I6>=H6),G6/(I6-H6+1),0))"
      },
      {
       "column": "T",
       "header": "ترتيب التجاوز",
       "kind": "formula",
       "formula_row_1": "=IF(A6&\"\"=\"\",\"\",IF(Q6>0,COUNTIFS($Q$6:$Q$105,\">\"&Q6)+COUNTIFS($Q$6:Q6,Q6),\"\"))"
      }
     ]
    }
   ]
  },
  {
   "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": [
        "2026-10-02",
        "2026-10-05",
        "2026-10-08"
       ]
      },
      {
       "column": "B",
       "header": "رقم العقد / الأمر",
       "kind": "input",
       "examples": [
        "C-01",
        "C-02",
        "C-03"
       ]
      },
      {
       "column": "C",
       "header": "كود البند",
       "kind": "input",
       "examples": [
        "B01",
        "B02",
        "E01"
       ],
       "allowed_values": {
        "from_range": "'البنود'!$A$6:$A$105"
       }
      },
      {
       "column": "D",
       "header": "المورد / المقاول",
       "kind": "input",
       "examples": [
        "المقاول منصور للهدم والبناء",
        "المقاول منصور للهدم والبناء",
        "م. وليد للتركيبات الكهربائية"
       ]
      },
      {
       "column": "E",
       "header": "قيمة الالتزام",
       "kind": "input",
       "examples": [
        52000,
        112000,
        55250
       ]
      },
      {
       "column": "F",
       "header": "البند",
       "kind": "formula",
       "formula_row_1": "=IF(C6&\"\"=\"\",\"\",IFERROR(INDEX('البنود'!$C$6:$C$105,MATCH(C6&\"\",'البنود'!$A$6:$A$105,0))&\"\",\"\"))"
      },
      {
       "column": "G",
       "header": "المدفوع عليه",
       "kind": "formula",
       "formula_row_1": "=IF(B6&\"\"=\"\",\"\",ROUND(SUMIFS('المدفوعات'!$D$6:$D$1505,'المدفوعات'!$B$6:$B$1505,B6&\"\"),2))"
      },
      {
       "column": "H",
       "header": "المتبقي للدفع",
       "kind": "formula",
       "formula_row_1": "=IF(OR(B6&\"\"=\"\",NOT(ISNUMBER(E6))),\"\",ROUND(E6-G6,2))"
      },
      {
       "column": "I",
       "header": "الحالة",
       "kind": "formula",
       "formula_row_1": "=IF(AND(B6&\"\"=\"\",C6&\"\"=\"\",E6&\"\"=\"\"),\"\",IF(ISNA(MATCH(C6&\"\",'البنود'!$A$6:$A$105,0)),\"كود غير موجود\",IF(COUNTIF($B$6:$B$505,B6&\"\")>1,\"رقم مكرر\",IF(H6<0,\"مدفوع أكثر من العقد\",IF(H6=0,\"مدفوع بالكامل\",IF(G6=0,\"لم يُدفع\",\"جارٍ\"))))))"
      }
     ]
    }
   ]
  },
  {
   "name": "المدفوعات",
   "formula_cells": 4500,
   "record_tables": [
    {
     "header_row": 5,
     "first_record_row": 6,
     "sample_rows_filled": 17,
     "capacity_last_row": 1505,
     "columns": [
      {
       "column": "A",
       "header": "التاريخ",
       "kind": "input",
       "examples": [
        "2026-10-03",
        "2026-10-06",
        "2026-10-10"
       ]
      },
      {
       "column": "B",
       "header": "رقم العقد",
       "kind": "input",
       "examples": [
        "C-01",
        "C-02",
        "C-03"
       ],
       "allowed_values": {
        "from_range": "'الالتزامات'!$B$6:$B$505"
       }
      },
      {
       "column": "C",
       "header": "كود البند (لدفع مباشر)",
       "kind": "input",
       "examples": [
        "M01",
        "X02",
        "M01"
       ],
       "allowed_values": {
        "from_range": "'البنود'!$A$6:$A$105"
       }
      },
      {
       "column": "D",
       "header": "المبلغ",
       "kind": "input",
       "examples": [
        25000,
        40000,
        20000
       ]
      },
      {
       "column": "E",
       "header": "بيان",
       "kind": "input",
       "examples": [
        "دفعة مقدمة",
        "دفعة مقدمة",
        "دفعة مقدمة"
       ]
      },
      {
       "column": "F",
       "header": "كود البند الفعلي",
       "kind": "formula",
       "formula_row_1": "=IF(AND(B6&\"\"=\"\",C6&\"\"=\"\"),\"\",IF(B6&\"\"<>\"\",IFERROR(INDEX('الالتزامات'!$C$6:$C$505,MATCH(B6&\"\",'الالتزامات'!$B$6:$B$505,0))&\"\",C6&\"\"),C6&\"\"))"
      },
      {
       "column": "G",
       "header": "البند",
       "kind": "formula",
       "formula_row_1": "=IF(F6=\"\",\"\",IFERROR(INDEX('البنود'!$C$6:$C$105,MATCH(F6,'البنود'!$A$6:$A$105,0))&\"\",\"\"))"
      },
      {
       "column": "H",
       "header": "الحالة",
       "kind": "formula",
       "formula_row_1": "=IF(AND(A6&\"\"=\"\",B6&\"\"=\"\",C6&\"\"=\"\",D6&\"\"=\"\"),\"\",IF(B6&\"\"<>\"\",IF(ISNA(MATCH(B6&\"\",'الالتزامات'!$B$6:$B$505,0)),\"عقد غير موجود\",\"على عقد\"),IF(C6&\"\"<>\"\",IF(ISNA(MATCH(C6&\"\",'البنود'!$A$6:$A$105,0)),\"كود غير موجود\",\"دفع مباشر\"),\"بلا عقد أو كود\")))"
      }
     ]
    }
   ]
  },
  {
   "name": "المنحنى الشهري",
   "formula_cells": 87,
   "record_tables": [
    {
     "header_row": 5,
     "first_record_row": 6,
     "sample_rows_filled": 14,
     "capacity_last_row": 20,
     "columns": [
      {
       "column": "A",
       "header": "الشهر",
       "kind": "input",
       "examples": [
        "شهر 1",
        "شهر 2",
        "شهر 3"
       ]
      },
      {
       "column": "B",
       "header": "أول الشهر",
       "kind": "formula",
       "formula_row_1": "=EDATE('الإعدادات'!$B$7,0)"
      },
      {
       "column": "C",
       "header": "مخطط الشهر",
       "kind": "formula",
       "formula_row_1": "=ROUND(SUMIFS('البنود'!$S$6:$S$105,'البنود'!$H$6:$H$105,\"<=\"&1,'البنود'!$I$6:$I$105,\">=\"&1),2)"
      },
      {
       "column": "D",
       "header": "مخطط تراكمي",
       "kind": "formula",
       "formula_row_1": "=ROUND(SUM($C$6:C6),2)"
      },
      {
       "column": "E",
       "header": "مدفوع الشهر",
       "kind": "formula",
       "formula_row_1": "=ROUND(SUMIFS('المدفوعات'!$D$6:$D$1505,'المدفوعات'!$A$6:$A$1505,\">=\"&B6,'المدفوعات'!$A$6:$A$1505,\"<\"&EDATE(B6,1)),2)"
      },
      {
       "column": "F",
       "header": "مدفوع تراكمي",
       "kind": "formula",
       "formula_row_1": "=IF(B6>'الإعدادات'!$B$10,\"\",ROUND(SUM($E$6:E6),2))"
      },
      {
       "column": "G",
       "header": "الفرق التراكمي (مدفوع - مخطط)",
       "kind": "formula",
       "formula_row_1": "=IF(F6=\"\",\"\",ROUND(F6-D6,2))"
      },
      {
       "column": "H",
       "header": "التزامات الشهر",
       "kind": "formula",
       "formula_row_1": "=ROUND(SUMIFS('الالتزامات'!$E$6:$E$505,'الالتزامات'!$A$6:$A$505,\">=\"&B6,'الالتزامات'!$A$6:$A$505,\"<\"&EDATE(B6,1)),2)"
      }
     ]
    }
   ]
  },
  {
   "name": "الملخص",
   "formula_cells": 78,
   "record_tables": [
    {
     "header_row": 51,
     "first_record_row": 52,
     "sample_rows_filled": 0,
     "capacity_last_row": 59,
     "columns": [
      {
       "column": "A",
       "header": "الفئة",
       "kind": "formula",
       "formula_row_1": "=IF('الإعدادات'!A14&\"\"=\"\",\"\",'الإعدادات'!A14)"
      },
      {
       "column": "B",
       "header": "الميزانية",
       "kind": "formula",
       "formula_row_1": "=IF($A52=\"\",\"\",ROUND(SUMIFS('البنود'!$G$6:$G$105,'البنود'!$B$6:$B$105,$A52),2))"
      },
      {
       "column": "C",
       "header": "الملتزم به",
       "kind": "formula",
       "formula_row_1": "=IF($A52=\"\",\"\",ROUND(SUMIFS('البنود'!$K$6:$K$105,'البنود'!$B$6:$B$105,$A52),2))"
      },
      {
       "column": "D",
       "header": "المدفوع",
       "kind": "formula",
       "formula_row_1": "=IF($A52=\"\",\"\",ROUND(SUMIFS('البنود'!$L$6:$L$105,'البنود'!$B$6:$B$105,$A52),2))"
      },
      {
       "column": "E",
       "header": "نسبة المدفوع",
       "kind": "formula",
       "formula_row_1": "=IF(OR($A52=\"\",N(B52)=0),\"\",D52/B52)"
      }
     ]
    }
   ],
   "settings": [
    {
     "label": "البند",
     "cell": "B43",
     "value": "التجاوز المتوقع"
    }
   ],
   "results": [
    {
     "label": "اسم المشروع",
     "cell": "B5",
     "formula": "='الإعدادات'!B4"
    },
    {
     "label": "تاريخ المتابعة",
     "cell": "B6",
     "formula": "='الإعدادات'!$B$5"
    },
    {
     "label": "ميزانية المشروع (BAC)",
     "cell": "B9",
     "formula": "=SUM('البنود'!$G$6:$G$105)"
    },
    {
     "label": "احتياطي الطوارئ",
     "cell": "B10",
     "formula": "='الإعدادات'!$B$8"
    },
    {
     "label": "الميزانية الكلية مع الاحتياطي",
     "cell": "B11",
     "formula": "=ROUND(B9+B10,2)"
    },
    {
     "label": "الملتزم به (عقود وأوامر شراء ودفع مباشر)",
     "cell": "B12",
     "formula": "=SUM('البنود'!$K$6:$K$105)"
    },
    {
     "label": "نسبة الالتزام من الميزانية",
     "cell": "B13",
     "formula": "=IF(B9=0,\"\",B12/B9)"
    },
    {
     "label": "المدفوع فعليًا (AC)",
     "cell": "B14",
     "formula": "=SUM('البنود'!$L$6:$L$105)"
    },
    {
     "label": "نسبة المدفوع من الميزانية",
     "cell": "B15",
     "formula": "=IF(B9=0,\"\",B14/B9)"
    },
    {
     "label": "متبقٍ للدفع على الالتزامات",
     "cell": "B16",
     "formula": "=SUM('البنود'!$M$6:$M$105)"
    },
    {
     "label": "ميزانية لم تُلتزم بعد",
     "cell": "B17",
     "formula": "=ROUND(SUMIF('البنود'!$N$6:$N$105,\">0\"),2)"
    },
    {
     "label": "التزامات تجاوزت ميزانية بنودها",
     "cell": "B18",
     "formula": "=ROUND(-SUMIF('البنود'!$N$6:$N$105,\"<0\"),2)"
    },
    {
     "label": "القيمة المنجزة (EV)",
     "cell": "B21",
     "formula": "=SUM('البنود'!$O$6:$O$105)"
    },
    {
     "label": "نسبة الإنجاز الفعلي للمشروع",
     "cell": "B22",
     "formula": "=IF(B9=0,\"\",B21/B9)"
    },
    {
     "label": "المخطط حتى نهاية شهر المتابعة (PV)",
     "cell": "B23",
     "formula": "=ROUND(SUMIFS('المنحنى الشهري'!$C$6:$C$17,'المنحنى الشهري'!$B$6:$B$17,\"<=\"&'الإعدادات'!$B$10),2)"
    },
    {
     "label": "مؤشر الأداء في التكلفة CPI (أقل من 1 = صرف أكثر من الإنجاز)",
     "cell": "B24",
     "formula": "=IF(B14=0,\"\",B21/B14)"
    },
    {
     "label": "مؤشر الأداء في الجدول SPI (أقل من 1 = متأخر عن الخطة)",
     "cell": "B25",
     "formula": "=IF(B23=0,\"\",B21/B23)"
    },
    {
     "label": "التوقع عند الإنجاز (EAC)",
     "cell": "B28",
     "formula": "=SUM('البنود'!$P$6:$P$105)"
    },
    {
     "label": "الفرق عن الميزانية (الموجب = تجاوز)",
     "cell": "B29",
     "formula": "=ROUND(B28-B9,2)"
    },
    {
     "label": "مجموع التجاوزات المتوقعة في البنود",
     "cell": "B30",
     "formula": "=ROUND(SUMIF('البنود'!$Q$6:$Q$105,\">0\"),2)"
    },
    {
     "label": "المستهلك من الاحتياطي",
     "cell": "B31",
     "formula": "=MIN(B10,B30)"
    },
    {
     "label": "المتبقي من الاحتياطي",
     "cell": "B32",
     "formula": "=ROUND(B10-B30,2)"
    },
    {
     "label": "نسبة استهلاك الاحتياطي",
     "cell": "B33",
     "formula": "=IF(B10=0,\"\",B30/B10)"
    },
    {
     "label": "هل يكفي الاحتياطي للتجاوزات؟",
     "cell": "B34",
     "formula": "=IF(B32>=0,\"يكفي\",\"لا يكفي\")"
    },
    {
     "label": "بنود تجاوزت ميزانيتها",
     "cell": "B37",
     "formula": "=COUNTIF('البنود'!$R$6:$R$105,\"تجاوز\")"
    },
    {
     "label": "بنود يُتوقع أن تتجاوز",
     "cell": "B38",
     "formula": "=COUNTIF('البنود'!$R$6:$R$105,\"تجاوز متوقع\")"
    },
    {
     "label": "بنود اقتربت من حدها",
     "cell": "B39",
     "formula": "=COUNTIF('البنود'!$R$6:$R$105,\"قرب الحد\")"
    },
    {
     "label": "التزامات أو دفعات بكود أو عقد غير موجود",
     "cell": "B40",
     "formula": "=COUNTIF('الالتزامات'!$I$6:$I$505,\"كود غير موجود\")+COUNTIF('المدفوعات'!$H$6:$H$1505,\"عقد غير موجود\")+COUNTIF('المدفوعات'!$H$6:$H$1505,\"كود غير موجود\")+COUNTIF('المدفوعات'!$H$6:$H$1505,\"بلا عقد أو كود\")"
    }
   ]
  },
  {
   "name": "لماذا ما زلت على إكسل؟",
   "formula_cells": 0
  }
 ]
}