{
 "id": "school-management",
 "file": "softwiro-school-management.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": 1,
   "record_tables": [
    {
     "header_row": 11,
     "first_record_row": 12,
     "sample_rows_filled": 5,
     "capacity_last_row": 20,
     "columns": [
      {
       "column": "A",
       "header": "رقم القسط",
       "kind": "input",
       "examples": [
        1,
        2,
        3
       ]
      },
      {
       "column": "B",
       "header": "تاريخ القسط",
       "kind": "input",
       "examples": [
        "2026-10-01",
        "2026-11-01",
        "2027-01-01"
       ]
      },
      {
       "column": "C",
       "header": "نسبته",
       "kind": "input",
       "examples": [
        0.4,
        0.3,
        0.2
       ]
      }
     ]
    }
   ],
   "settings": [
    {
     "label": "تاريخ اليوم",
     "cell": "B4",
     "value": "2026-11-15"
    },
    {
     "label": "أي تاريخ داخل شهر التقرير",
     "cell": "B5",
     "value": "2026-11-15"
    },
    {
     "label": "أول شهر في جدول الدخل والمصروف",
     "cell": "B6",
     "value": "2026-10-01"
    },
    {
     "label": "نصاب المعلم (حصص في الأسبوع)",
     "cell": "B7",
     "value": 24
    },
    {
     "label": "حد الحضور المنخفض (أقل من)",
     "cell": "B8",
     "value": 0.9
    }
   ]
  },
  {
   "name": "الفصول",
   "formula_cells": 100,
   "record_tables": [
    {
     "header_row": 5,
     "first_record_row": 6,
     "sample_rows_filled": 6,
     "capacity_last_row": 25,
     "columns": [
      {
       "column": "A",
       "header": "الفصل",
       "kind": "input",
       "examples": [
        "KG1 أ",
        "KG2 أ",
        "أولى أ"
       ]
      },
      {
       "column": "B",
       "header": "الصف",
       "kind": "input",
       "examples": [
        "KG1",
        "KG2",
        "أولى ابتدائي"
       ],
       "allowed_values": {
        "from_range": "'الإعدادات'!$E$12:$E$19"
       }
      },
      {
       "column": "C",
       "header": "السعة",
       "kind": "input",
       "examples": [
        12,
        14,
        14
       ]
      },
      {
       "column": "D",
       "header": "معلم الفصل",
       "kind": "input",
       "examples": [
        "منال سيد",
        "رشا عادل",
        "سعاد منصور"
       ],
       "allowed_values": {
        "from_range": "'المعلمون'!$A$6:$A$45"
       }
      },
      {
       "column": "E",
       "header": "الطلاب",
       "kind": "formula",
       "formula_row_1": "=IF(A6&\"\"=\"\",\"\",COUNTIFS('الطلاب'!$C$6:$C$305,A6&\"\",'الطلاب'!$F$6:$F$305,\"ملتحق\"))"
      },
      {
       "column": "F",
       "header": "المقاعد المتاحة",
       "kind": "formula",
       "formula_row_1": "=IF(A6&\"\"=\"\",\"\",MAX(0,N(C6)-E6))"
      },
      {
       "column": "G",
       "header": "الإشغال",
       "kind": "formula",
       "formula_row_1": "=IF(OR(A6&\"\"=\"\",N(C6)=0),\"\",E6/C6)"
      },
      {
       "column": "H",
       "header": "الحالة",
       "kind": "formula",
       "formula_row_1": "=IF(OR(A6&\"\"=\"\",N(C6)=0),\"\",IF(E6>C6,\"فوق السعة\",IF(E6=C6,\"مكتمل\",\"متاح\")))"
      },
      {
       "column": "I",
       "header": "حصص الأسبوع",
       "kind": "formula",
       "formula_row_1": "=IF(A6&\"\"=\"\",\"\",SUMIFS('توزيع الحصص'!$D$6:$D$305,'توزيع الحصص'!$A$6:$A$305,A6&\"\"))"
      }
     ]
    }
   ]
  },
  {
   "name": "الطلاب",
   "formula_cells": 2100,
   "record_tables": [
    {
     "header_row": 5,
     "first_record_row": 6,
     "sample_rows_filled": 80,
     "capacity_last_row": 305,
     "columns": [
      {
       "column": "A",
       "header": "الكود",
       "kind": "input",
       "examples": [
        "S001",
        "S002",
        "S003"
       ]
      },
      {
       "column": "B",
       "header": "الطالب",
       "kind": "input",
       "examples": [
        "أحمد محمود",
        "محمد هشام",
        "يوسف سامح"
       ]
      },
      {
       "column": "C",
       "header": "الفصل",
       "kind": "input",
       "examples": [
        "KG1 أ",
        "KG1 أ",
        "KG1 أ"
       ],
       "allowed_values": {
        "from_range": "'الفصول'!$A$6:$A$25"
       }
      },
      {
       "column": "D",
       "header": "ولي الأمر",
       "kind": "input",
       "examples": [
        "محمود عبد الله",
        "هشام فؤاد",
        "سامح رشدي"
       ]
      },
      {
       "column": "E",
       "header": "الجوال",
       "kind": "input",
       "examples": [
        "01020000001",
        "01020000002",
        "01020000003"
       ]
      },
      {
       "column": "F",
       "header": "الحالة",
       "kind": "input",
       "examples": [
        "ملتحق",
        "ملتحق",
        "ملتحق"
       ],
       "allowed_values": [
        "ملتحق",
        "منسحب"
       ]
      },
      {
       "column": "G",
       "header": "الخصم",
       "kind": "input",
       "examples": [
        1500,
        1500,
        1500
       ]
      },
      {
       "column": "H",
       "header": "الصف",
       "kind": "formula",
       "formula_row_1": "=IF(C6&\"\"=\"\",\"\",IFERROR(INDEX('الفصول'!$B$6:$B$25,MATCH(C6&\"\",'الفصول'!$A$6:$A$25,0)),\"فصل غير موجود\"))"
      },
      {
       "column": "I",
       "header": "المصروفات السنوية",
       "kind": "formula",
       "formula_row_1": "=IF(H6=\"\",\"\",IFERROR(INDEX('الإعدادات'!$F$12:$F$19,MATCH(H6,'الإعدادات'!$E$12:$E$19,0)),0))"
      },
      {
       "column": "J",
       "header": "الصافي بعد الخصم",
       "kind": "formula",
       "formula_row_1": "=IF(I6=\"\",\"\",IF(F6=\"منسحب\",0,MAX(0,I6-N(G6))))"
      },
      {
       "column": "K",
       "header": "المستحق حتى اليوم",
       "kind": "formula",
       "formula_row_1": "=IF(J6=\"\",\"\",ROUND(J6*SUMIFS('الإعدادات'!$C$12:$C$19,'الإعدادات'!$B$12:$B$19,\"<=\"&'الإعدادات'!$B$4),2))"
      },
      {
       "column": "L",
       "header": "المدفوع",
       "kind": "formula",
       "formula_row_1": "=IF(A6&\"\"=\"\",\"\",SUMIFS('المدفوعات'!$D$6:$D$2005,'المدفوعات'!$B$6:$B$2005,A6&\"\"))"
      },
      {
       "column": "M",
       "header": "المتأخر",
       "kind": "formula",
       "formula_row_1": "=IF(K6=\"\",\"\",ROUND(K6-L6,2))"
      },
      {
       "column": "N",
       "header": "الموقف",
       "kind": "formula",
       "formula_row_1": "=IF(M6=\"\",\"\",IF(F6=\"منسحب\",\"منسحب\",IF(M6>0,\"متأخر\",IF(M6<0,\"دفع مقدمًا\",\"مسدد\"))))"
      }
     ]
    }
   ]
  },
  {
   "name": "المدفوعات",
   "formula_cells": 2000,
   "record_tables": [
    {
     "header_row": 5,
     "first_record_row": 6,
     "sample_rows_filled": 117,
     "capacity_last_row": 2005,
     "columns": [
      {
       "column": "A",
       "header": "التاريخ",
       "kind": "input",
       "examples": [
        "2026-10-01",
        "2026-10-01",
        "2026-10-01"
       ]
      },
      {
       "column": "B",
       "header": "كود الطالب",
       "kind": "input",
       "examples": [
        "S001",
        "S019",
        "S028"
       ],
       "allowed_values": {
        "from_range": "'الطلاب'!$A$6:$A$305"
       }
      },
      {
       "column": "C",
       "header": "الطالب",
       "kind": "formula",
       "formula_row_1": "=IF(B6&\"\"=\"\",\"\",IFERROR(INDEX('الطلاب'!$B$6:$B$305,MATCH(B6&\"\",'الطلاب'!$A$6:$A$305,0)),\"كود غير موجود\"))"
      },
      {
       "column": "D",
       "header": "المبلغ",
       "kind": "input",
       "examples": [
        7200,
        8000,
        4800
       ]
      },
      {
       "column": "E",
       "header": "طريقة الدفع",
       "kind": "input",
       "examples": [
        "نقدًا",
        "تحويل بنكي",
        "شيك"
       ],
       "allowed_values": [
        "نقدًا",
        "تحويل بنكي",
        "شيك",
        "محفظة إلكترونية"
       ]
      },
      {
       "column": "F",
       "header": "رقم الإيصال",
       "kind": "input",
       "examples": [
        "R-1001",
        "R-1002",
        "R-1003"
       ]
      },
      {
       "column": "G",
       "header": "ملاحظة",
       "kind": "input"
      }
     ]
    }
   ]
  },
  {
   "name": "المعلمون",
   "formula_cells": 160,
   "record_tables": [
    {
     "header_row": 5,
     "first_record_row": 6,
     "sample_rows_filled": 9,
     "capacity_last_row": 45,
     "columns": [
      {
       "column": "A",
       "header": "المعلم",
       "kind": "input",
       "examples": [
        "سعاد منصور",
        "هدى عبد الرحمن",
        "محمد فتحي"
       ]
      },
      {
       "column": "B",
       "header": "المادة",
       "kind": "input",
       "examples": [
        "اللغة العربية",
        "اللغة الإنجليزية",
        "الرياضيات"
       ]
      },
      {
       "column": "C",
       "header": "الجوال",
       "kind": "input",
       "examples": [
        "01201230001",
        "01201230002",
        "01201230003"
       ]
      },
      {
       "column": "D",
       "header": "الراتب الشهري",
       "kind": "input",
       "examples": [
        6500,
        6200,
        6800
       ]
      },
      {
       "column": "E",
       "header": "حصص الأسبوع",
       "kind": "formula",
       "formula_row_1": "=IF(A6&\"\"=\"\",\"\",SUMIFS('توزيع الحصص'!$D$6:$D$305,'توزيع الحصص'!$C$6:$C$305,A6&\"\"))"
      },
      {
       "column": "F",
       "header": "من النصاب",
       "kind": "formula",
       "formula_row_1": "=IF(OR(A6&\"\"=\"\",N('الإعدادات'!$B$7)=0),\"\",E6/'الإعدادات'!$B$7)"
      },
      {
       "column": "G",
       "header": "الموقف",
       "kind": "formula",
       "formula_row_1": "=IF(F6=\"\",\"\",IF(E6>'الإعدادات'!$B$7,\"زائد\",IF(E6<'الإعدادات'!$B$7/2,\"منخفض\",\"مناسب\")))"
      },
      {
       "column": "H",
       "header": "عدد السطور",
       "kind": "formula",
       "formula_row_1": "=IF(A6&\"\"=\"\",\"\",COUNTIFS('توزيع الحصص'!$C$6:$C$305,A6&\"\"))"
      }
     ]
    }
   ]
  },
  {
   "name": "توزيع الحصص",
   "formula_cells": 300,
   "record_tables": [
    {
     "header_row": 5,
     "first_record_row": 6,
     "sample_rows_filled": 35,
     "capacity_last_row": 305,
     "columns": [
      {
       "column": "A",
       "header": "الفصل",
       "kind": "input",
       "examples": [
        "KG1 أ",
        "KG2 أ",
        "KG2 أ"
       ],
       "allowed_values": {
        "from_range": "'الفصول'!$A$6:$A$25"
       }
      },
      {
       "column": "B",
       "header": "المادة",
       "kind": "input",
       "examples": [
        "أنشطة ولغة وحساب",
        "أنشطة ولغة وحساب",
        "حاسب"
       ]
      },
      {
       "column": "C",
       "header": "المعلم",
       "kind": "input",
       "examples": [
        "منال سيد",
        "رشا عادل",
        "إبراهيم رضا"
       ],
       "allowed_values": {
        "from_range": "'المعلمون'!$A$6:$A$45"
       }
      },
      {
       "column": "D",
       "header": "حصص الأسبوع",
       "kind": "input",
       "examples": [
        26,
        24,
        1
       ]
      },
      {
       "column": "E",
       "header": "تنبيه",
       "kind": "formula",
       "formula_row_1": "=IF(A6&B6&C6=\"\",\"\",IF(COUNTIFS('الفصول'!$A$6:$A$25,A6&\"\")=0,\"فصل غير موجود\",IF(COUNTIFS('المعلمون'!$A$6:$A$45,C6&\"\")=0,\"معلم غير موجود\",\"\")))"
      }
     ]
    }
   ]
  },
  {
   "name": "الحضور الشهري",
   "formula_cells": 800,
   "record_tables": [
    {
     "header_row": 5,
     "first_record_row": 6,
     "sample_rows_filled": 12,
     "capacity_last_row": 205,
     "columns": [
      {
       "column": "A",
       "header": "الشهر (أول يوم)",
       "kind": "input",
       "examples": [
        "2026-10-01",
        "2026-10-01",
        "2026-10-01"
       ]
      },
      {
       "column": "B",
       "header": "الفصل",
       "kind": "input",
       "examples": [
        "KG1 أ",
        "KG2 أ",
        "أولى أ"
       ],
       "allowed_values": {
        "from_range": "'الفصول'!$A$6:$A$25"
       }
      },
      {
       "column": "C",
       "header": "أيام الدراسة",
       "kind": "input",
       "examples": [
        22,
        22,
        22
       ]
      },
      {
       "column": "D",
       "header": "مجموع أيام الغياب",
       "kind": "input",
       "examples": [
        12,
        20,
        15
       ]
      },
      {
       "column": "E",
       "header": "الطلاب",
       "kind": "formula",
       "formula_row_1": "=IF(B6&\"\"=\"\",\"\",COUNTIFS('الطلاب'!$C$6:$C$305,B6&\"\",'الطلاب'!$F$6:$F$305,\"ملتحق\"))"
      },
      {
       "column": "F",
       "header": "الأيام الممكنة",
       "kind": "formula",
       "formula_row_1": "=IF(E6=\"\",\"\",N(C6)*E6)"
      },
      {
       "column": "G",
       "header": "نسبة الحضور",
       "kind": "formula",
       "formula_row_1": "=IF(OR(E6=\"\",N(F6)=0),\"\",ROUND(1-N(D6)/F6,4))"
      },
      {
       "column": "H",
       "header": "الموقف",
       "kind": "formula",
       "formula_row_1": "=IF(G6=\"\",\"\",IF(G6<'الإعدادات'!$B$8,\"منخفض\",\"جيد\"))"
      }
     ]
    }
   ]
  },
  {
   "name": "المصروفات",
   "formula_cells": 0,
   "record_tables": [
    {
     "header_row": 5,
     "first_record_row": 6,
     "sample_rows_filled": 11,
     "capacity_last_row": 16,
     "columns": [
      {
       "column": "A",
       "header": "التاريخ",
       "kind": "input",
       "examples": [
        "2026-10-01",
        "2026-10-07",
        "2026-10-10"
       ]
      },
      {
       "column": "B",
       "header": "البند",
       "kind": "input",
       "examples": [
        "إيجار",
        "مرافق",
        "كتب ومستلزمات"
       ],
       "allowed_values": {
        "from_range": "'الإعدادات'!$H$12:$H$19"
       }
      },
      {
       "column": "C",
       "header": "البيان",
       "kind": "input",
       "examples": [
        "إيجار مبنى المدرسة",
        "كهرباء ومياه وإنترنت",
        "كراسات وأدوات فصول"
       ]
      },
      {
       "column": "D",
       "header": "المبلغ",
       "kind": "input",
       "examples": [
        25000,
        6500,
        12000
       ]
      }
     ]
    }
   ]
  },
  {
   "name": "الملخص",
   "formula_cells": 148,
   "record_tables": [
    {
     "header_row": 33,
     "first_record_row": 34,
     "sample_rows_filled": 0,
     "capacity_last_row": 72,
     "columns": [
      {
       "column": "A",
       "header": "الصف",
       "kind": "formula",
       "formula_row_1": "=IF('الإعدادات'!E12&\"\"=\"\",\"\",'الإعدادات'!E12)"
      },
      {
       "column": "B",
       "header": "الطلاب",
       "kind": "formula",
       "formula_row_1": "=IF(A34=\"\",\"\",COUNTIFS('الطلاب'!$H$6:$H$305,A34,'الطلاب'!$F$6:$F$305,\"ملتحق\"))"
      },
      {
       "column": "C",
       "header": "صافي المصروفات",
       "kind": "formula",
       "formula_row_1": "=IF(A34=\"\",\"\",SUMIFS('الطلاب'!$J$6:$J$305,'الطلاب'!$H$6:$H$305,A34))"
      },
      {
       "column": "D",
       "header": "المستحق حتى اليوم",
       "kind": "formula",
       "formula_row_1": "=IF(A34=\"\",\"\",SUMIFS('الطلاب'!$K$6:$K$305,'الطلاب'!$H$6:$H$305,A34))"
      },
      {
       "column": "E",
       "header": "المدفوع",
       "kind": "formula",
       "formula_row_1": "=IF(A34=\"\",\"\",SUMIFS('الطلاب'!$L$6:$L$305,'الطلاب'!$H$6:$H$305,A34))"
      },
      {
       "column": "F",
       "header": "المتأخر",
       "kind": "formula",
       "formula_row_1": "=IF(A34=\"\",\"\",SUMIFS('الطلاب'!$M$6:$M$305,'الطلاب'!$H$6:$H$305,A34,'الطلاب'!$M$6:$M$305,\">0\"))"
      }
     ]
    }
   ],
   "results": [
    {
     "label": "الطلاب الملتحقون",
     "cell": "B5",
     "formula": "=COUNTIFS('الطلاب'!$F$6:$F$305,\"ملتحق\")"
    },
    {
     "label": "المنسحبون",
     "cell": "B6",
     "formula": "=COUNTIFS('الطلاب'!$F$6:$F$305,\"منسحب\")"
    },
    {
     "label": "السعة الكلية للفصول",
     "cell": "B7",
     "formula": "=SUM('الفصول'!$C$6:$C$25)"
    },
    {
     "label": "نسبة الإشغال",
     "cell": "B8",
     "formula": "=IF(B7=0,\"\",B5/B7)"
    },
    {
     "label": "فصول فوق السعة",
     "cell": "B9",
     "formula": "=COUNTIFS('الفصول'!$H$6:$H$25,\"فوق السعة\")"
    },
    {
     "label": "صافي مصروفات العام",
     "cell": "B12",
     "formula": "=SUM('الطلاب'!$J$6:$J$305)"
    },
    {
     "label": "المستحق حتى اليوم",
     "cell": "B13",
     "formula": "=SUM('الطلاب'!$K$6:$K$305)"
    },
    {
     "label": "المدفوع",
     "cell": "B14",
     "formula": "=SUM('الطلاب'!$L$6:$L$305)"
    },
    {
     "label": "إجمالي المتأخر",
     "cell": "B15",
     "formula": "=SUMIFS('الطلاب'!$M$6:$M$305,'الطلاب'!$M$6:$M$305,\">0\")"
    },
    {
     "label": "عدد الطلاب المتأخرين",
     "cell": "B16",
     "formula": "=COUNTIFS('الطلاب'!$M$6:$M$305,\">0\")"
    },
    {
     "label": "نسبة التحصيل من المستحق",
     "cell": "B17",
     "formula": "=IF(B13=0,\"\",B14/B13)"
    },
    {
     "label": "المحصَّل في الشهر",
     "cell": "B20",
     "formula": "=SUMIFS('المدفوعات'!$D$6:$D$2005,'المدفوعات'!$A$6:$A$2005,\">=\"&DATE(YEAR('الإعدادات'!$B$5),MONTH('الإعدادات'!$B$5),1),'المدفوعات'!$A$6:$A$2005,\"<=\"&EOMONTH('الإعدادات'!$B$5,0))"
    },
    {
     "label": "المصروفات في الشهر",
     "cell": "B21",
     "formula": "=SUMIFS('المصروفات'!$D$6:$D$1005,'المصروفات'!$A$6:$A$1005,\">=\"&DATE(YEAR('الإعدادات'!$B$5),MONTH('الإعدادات'!$B$5),1),'المصروفات'!$A$6:$A$1005,\"<=\"&EOMONTH('الإعدادات'!$B$5,0))"
    },
    {
     "label": "الصافي",
     "cell": "B22",
     "formula": "=B20-B21"
    },
    {
     "label": "نسبة الحضور في الشهر",
     "cell": "B23",
     "formula": "=IF(SUMIFS('الحضور الشهري'!$F$6:$F$205,'الحضور الشهري'!$A$6:$A$205,\">=\"&DATE(YEAR('الإعدادات'!$B$5),MONTH('الإعدادات'!$B$5),1),'الحضور الشهري'!$A$6:$A$205,\"<=\"&EOMONTH('الإعدادات'!$B$5,0))=0,\"\",1-SUMIFS('الحضور الشهري'!$D$6:$D$205,'الحضور الشهري'!$A$6:$A$205,\">=\"&DATE(YEAR('الإعدادات'!$B$5),MONTH('الإعدادات'!$B$5),1),'الحضور الشهري'!$A$6:$A$205,\"<=\"&EOMONTH('الإعدادات'!$B$5,0))/SUMIFS('الحضور الشهري'!$F$6:$F$205,'الحضور الشهري'!$A$6:$A$205,\">=\"&DATE(YEAR('الإعدادات'!$B$5),MONTH('الإعدادات'!$B$5),1),'الحضور الشهري'!$A$6:$A$205,\"<=\"&EOMONTH('الإعدادات'!$B$5,0)))"
    },
    {
     "label": "فصول حضورها منخفض",
     "cell": "B24",
     "formula": "=COUNTIFS('الحضور الشهري'!$H$6:$H$205,\"منخفض\",'الحضور الشهري'!$A$6:$A$205,\">=\"&DATE(YEAR('الإعدادات'!$B$5),MONTH('الإعدادات'!$B$5),1),'الحضور الشهري'!$A$6:$A$205,\"<=\"&EOMONTH('الإعدادات'!$B$5,0))"
    },
    {
     "label": "عدد المعلمين",
     "cell": "B27",
     "formula": "=COUNTIFS('المعلمون'!$D$6:$D$45,\">0\")"
    },
    {
     "label": "رواتب المعلمين الشهرية",
     "cell": "B28",
     "formula": "=SUM('المعلمون'!$D$6:$D$45)"
    },
    {
     "label": "معلمون فوق النصاب",
     "cell": "B29",
     "formula": "=COUNTIFS('المعلمون'!$G$6:$G$45,\"زائد\")"
    },
    {
     "label": "معلمون حصصهم منخفضة",
     "cell": "B30",
     "formula": "=COUNTIFS('المعلمون'!$G$6:$G$45,\"منخفض\")"
    }
   ]
  },
  {
   "name": "لماذا ما زلت على إكسل؟",
   "formula_cells": 0
  }
 ]
}