{
 "id": "restaurant-inventory-waste",
 "file": "softwiro-restaurant-inventory-waste.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-10-01"
    },
    {
     "label": "نهاية الفترة",
     "cell": "B5",
     "value": "2026-10-31"
    },
    {
     "label": "هدف نسبة تكلفة الغذاء",
     "cell": "B6",
     "value": 0.32
    },
    {
     "label": "مضاعف الـ par لحساب كمية الطلب",
     "cell": "B7",
     "value": 2
    },
    {
     "label": "حد قبول الفرق بين الفعلي والنظري",
     "cell": "B8",
     "value": 0.05
    },
    {
     "label": "حد تنبيه الهالك من قيمة المشتريات",
     "cell": "B9",
     "value": 0.025
    }
   ]
  },
  {
   "name": "الخامات",
   "formula_cells": 1020,
   "record_tables": [
    {
     "header_row": 5,
     "first_record_row": 6,
     "sample_rows_filled": 14,
     "capacity_last_row": 65,
     "columns": [
      {
       "column": "A",
       "header": "الكود",
       "kind": "input",
       "examples": [
        "R01",
        "R02",
        "R03"
       ]
      },
      {
       "column": "B",
       "header": "الخامة",
       "kind": "input",
       "examples": [
        "صدور فراخ",
        "لحم مفروم",
        "جبنة موزاريلا"
       ]
      },
      {
       "column": "C",
       "header": "التصنيف",
       "kind": "input",
       "examples": [
        "دواجن",
        "لحوم",
        "ألبان"
       ],
       "allowed_values": {
        "from_range": "'الإعدادات'!$D$5:$D$14"
       }
      },
      {
       "column": "D",
       "header": "وحدة الشراء",
       "kind": "input",
       "examples": [
        "كيلو",
        "كيلو",
        "كيلو"
       ]
      },
      {
       "column": "E",
       "header": "وحدة الاستعمال",
       "kind": "input",
       "examples": [
        "جرام",
        "جرام",
        "جرام"
       ]
      },
      {
       "column": "F",
       "header": "المعامل (استعمال لكل شراء)",
       "kind": "input",
       "examples": [
        1000,
        1000,
        1000
       ]
      },
      {
       "column": "G",
       "header": "سعر وحدة الشراء",
       "kind": "input",
       "examples": [
        150,
        280,
        180
       ]
      },
      {
       "column": "H",
       "header": "رصيد افتتاحي",
       "kind": "input",
       "examples": [
        8000,
        10000,
        5000
       ]
      },
      {
       "column": "I",
       "header": "حد الـ par",
       "kind": "input",
       "examples": [
        6000,
        8000,
        4000
       ]
      },
      {
       "column": "J",
       "header": "تكلفة وحدة الاستعمال",
       "kind": "formula",
       "formula_row_1": "=IF(A6&\"\"=\"\",\"\",IFERROR(G6/F6,0))"
      },
      {
       "column": "K",
       "header": "المشتريات (استعمال)",
       "kind": "formula",
       "formula_row_1": "=IF(A6&\"\"=\"\",\"\",SUMIFS('المشتريات'!$I$6:$I$305,'المشتريات'!$B$6:$B$305,A6&\"\"))"
      },
      {
       "column": "L",
       "header": "المنصرف للمطبخ",
       "kind": "formula",
       "formula_row_1": "=IF(A6&\"\"=\"\",\"\",SUMIFS('الصرف للمطبخ'!$C$6:$C$605,'الصرف للمطبخ'!$B$6:$B$605,A6&\"\"))"
      },
      {
       "column": "M",
       "header": "الهالك",
       "kind": "formula",
       "formula_row_1": "=IF(A6&\"\"=\"\",\"\",SUMIFS('الهالك'!$C$6:$C$305,'الهالك'!$B$6:$B$305,A6&\"\"))"
      },
      {
       "column": "N",
       "header": "الرصيد الدفتري",
       "kind": "formula",
       "formula_row_1": "=IF(A6&\"\"=\"\",\"\",N(H6)+K6-L6-M6)"
      },
      {
       "column": "O",
       "header": "قيمة الرصيد",
       "kind": "formula",
       "formula_row_1": "=IF(A6&\"\"=\"\",\"\",ROUND(N6*J6,2))"
      },
      {
       "column": "P",
       "header": "الحالة",
       "kind": "formula",
       "formula_row_1": "=IF(A6&\"\"=\"\",\"\",IF(N6<=0,\"نفد\",IF(N6<N(I6),\"اطلب\",\"متوفر\")))"
      },
      {
       "column": "Q",
       "header": "كمية الطلب (وحدات شراء)",
       "kind": "formula",
       "formula_row_1": "=IF(A6&\"\"=\"\",\"\",IF(P6=\"متوفر\",\"\",MAX(0,ROUNDUP((N(I6)*'الإعدادات'!$B$7-N6)/F6,0))))"
      },
      {
       "column": "R",
       "header": "تكلفة الطلب",
       "kind": "formula",
       "formula_row_1": "=IF(A6&\"\"=\"\",\"\",IF(N(Q6)>0,ROUND(Q6*G6,2),\"\"))"
      },
      {
       "column": "S",
       "header": "ترتيب الطلب",
       "kind": "formula",
       "formula_row_1": "=IF(N(R6)>0,COUNTIFS($R$6:$R$65,\">\"&R6)+COUNTIFS($R$6:R6,R6),\"\")"
      },
      {
       "column": "T",
       "header": "قيمة المشتريات",
       "kind": "formula",
       "formula_row_1": "=IF(A6&\"\"=\"\",\"\",SUMIFS('المشتريات'!$J$6:$J$305,'المشتريات'!$B$6:$B$305,A6&\"\"))"
      },
      {
       "column": "U",
       "header": "قيمة الهالك",
       "kind": "formula",
       "formula_row_1": "=IF(A6&\"\"=\"\",\"\",SUMIFS('الهالك'!$H$6:$H$305,'الهالك'!$B$6:$B$305,A6&\"\"))"
      },
      {
       "column": "V",
       "header": "نسبة الهالك من المشتريات",
       "kind": "formula",
       "formula_row_1": "=IF(A6&\"\"=\"\",\"\",IF(T6>0,U6/T6,\"\"))"
      },
      {
       "column": "W",
       "header": "قيمة المنصرف",
       "kind": "formula",
       "formula_row_1": "=IF(A6&\"\"=\"\",\"\",SUMIFS('الصرف للمطبخ'!$H$6:$H$605,'الصرف للمطبخ'!$B$6:$B$605,A6&\"\"))"
      },
      {
       "column": "X",
       "header": "آخر جرد فعلي",
       "kind": "formula",
       "formula_row_1": "=IF(A6&\"\"=\"\",\"\",IF(COUNTIFS('الجرد اليومي'!$B$6:$B$405,A6&\"\")=0,\"\",SUMIFS('الجرد اليومي'!$C$6:$C$405,'الجرد اليومي'!$B$6:$B$405,A6&\"\",'الجرد اليومي'!$I$6:$I$405,1)))"
      },
      {
       "column": "Y",
       "header": "فرق آخر جرد",
       "kind": "formula",
       "formula_row_1": "=IF(A6&\"\"=\"\",\"\",IF(X6=\"\",\"\",SUMIFS('الجرد اليومي'!$G$6:$G$405,'الجرد اليومي'!$B$6:$B$405,A6&\"\",'الجرد اليومي'!$I$6:$I$405,1)))"
      },
      {
       "column": "Z",
       "header": "قيمة فرق الجرد",
       "kind": "formula",
       "formula_row_1": "=IF(A6&\"\"=\"\",\"\",IF(Y6=\"\",\"\",ROUND(Y6*J6,2)))"
      }
     ]
    }
   ]
  },
  {
   "name": "المشتريات",
   "formula_cells": 1200,
   "record_tables": [
    {
     "header_row": 5,
     "first_record_row": 6,
     "sample_rows_filled": 53,
     "capacity_last_row": 305,
     "columns": [
      {
       "column": "A",
       "header": "التاريخ",
       "kind": "input",
       "examples": [
        "2026-10-02",
        "2026-10-02",
        "2026-10-02"
       ]
      },
      {
       "column": "B",
       "header": "كود الخامة",
       "kind": "input",
       "examples": [
        "R03",
        "R06",
        "R09"
       ],
       "allowed_values": {
        "from_range": "'الخامات'!$A$6:$A$65"
       }
      },
      {
       "column": "C",
       "header": "المورد",
       "kind": "input",
       "examples": [
        "ألبان الريف",
        "سوق العبور - أبو إسلام",
        "بن الحرمين"
       ]
      },
      {
       "column": "D",
       "header": "الكمية (وحدة الشراء)",
       "kind": "input",
       "examples": [
        22,
        27,
        8
       ]
      },
      {
       "column": "E",
       "header": "سعر الوحدة",
       "kind": "input",
       "examples": [
        180,
        18,
        520
       ]
      },
      {
       "column": "F",
       "header": "رقم الفاتورة",
       "kind": "input",
       "examples": [
        "فاتورة 3156",
        "فاتورة 3219",
        "فاتورة 3303"
       ]
      },
      {
       "column": "G",
       "header": "اسم الخامة",
       "kind": "formula",
       "formula_row_1": "=IF(B6&\"\"=\"\",\"\",IFERROR(INDEX('الخامات'!$B$6:$B$65,MATCH(B6&\"\",'الخامات'!$A$6:$A$65,0))&\"\",\"كود غير موجود\"))"
      },
      {
       "column": "H",
       "header": "وحدة الشراء",
       "kind": "formula",
       "formula_row_1": "=IF(B6&\"\"=\"\",\"\",IFERROR(INDEX('الخامات'!$D$6:$D$65,MATCH(B6&\"\",'الخامات'!$A$6:$A$65,0))&\"\",\"\"))"
      },
      {
       "column": "I",
       "header": "الكمية (وحدة الاستعمال)",
       "kind": "formula",
       "formula_row_1": "=IF(B6&\"\"=\"\",\"\",IFERROR(N(D6)*INDEX('الخامات'!$F$6:$F$65,MATCH(B6&\"\",'الخامات'!$A$6:$A$65,0)),0))"
      },
      {
       "column": "J",
       "header": "إجمالي التكلفة",
       "kind": "formula",
       "formula_row_1": "=IF(B6&\"\"=\"\",\"\",ROUND(N(D6)*N(E6),2))"
      }
     ]
    }
   ]
  },
  {
   "name": "الصرف للمطبخ",
   "formula_cells": 1800,
   "record_tables": [
    {
     "header_row": 5,
     "first_record_row": 6,
     "sample_rows_filled": 70,
     "capacity_last_row": 605,
     "columns": [
      {
       "column": "A",
       "header": "التاريخ",
       "kind": "input",
       "examples": [
        "2026-10-06",
        "2026-10-06",
        "2026-10-06"
       ]
      },
      {
       "column": "B",
       "header": "كود الخامة",
       "kind": "input",
       "examples": [
        "R01",
        "R02",
        "R03"
       ],
       "allowed_values": {
        "from_range": "'الخامات'!$A$6:$A$65"
       }
      },
      {
       "column": "C",
       "header": "الكمية (وحدة الاستعمال)",
       "kind": "input",
       "examples": [
        43672,
        23882,
        13686
       ]
      },
      {
       "column": "D",
       "header": "جهة الصرف",
       "kind": "input",
       "examples": [
        "المطبخ الساخن",
        "المطبخ الساخن",
        "المطبخ الساخن"
       ],
       "allowed_values": {
        "from_range": "'الإعدادات'!$H$5:$H$10"
       }
      },
      {
       "column": "E",
       "header": "ملاحظة",
       "kind": "input",
       "examples": [
        "صرف يومي مجمّع",
        "صرف يومي مجمّع",
        "صرف يومي مجمّع"
       ]
      },
      {
       "column": "F",
       "header": "اسم الخامة",
       "kind": "formula",
       "formula_row_1": "=IF(B6&\"\"=\"\",\"\",IFERROR(INDEX('الخامات'!$B$6:$B$65,MATCH(B6&\"\",'الخامات'!$A$6:$A$65,0))&\"\",\"كود غير موجود\"))"
      },
      {
       "column": "G",
       "header": "وحدة الاستعمال",
       "kind": "formula",
       "formula_row_1": "=IF(B6&\"\"=\"\",\"\",IFERROR(INDEX('الخامات'!$E$6:$E$65,MATCH(B6&\"\",'الخامات'!$A$6:$A$65,0))&\"\",\"\"))"
      },
      {
       "column": "H",
       "header": "قيمة المنصرف",
       "kind": "formula",
       "formula_row_1": "=IF(B6&\"\"=\"\",\"\",IFERROR(ROUND(N(C6)*INDEX('الخامات'!$J$6:$J$65,MATCH(B6&\"\",'الخامات'!$A$6:$A$65,0)),2),0))"
      }
     ]
    }
   ]
  },
  {
   "name": "الهالك",
   "formula_cells": 1200,
   "record_tables": [
    {
     "header_row": 5,
     "first_record_row": 6,
     "sample_rows_filled": 28,
     "capacity_last_row": 305,
     "columns": [
      {
       "column": "A",
       "header": "التاريخ",
       "kind": "input",
       "examples": [
        "2026-10-04",
        "2026-10-05",
        "2026-10-08"
       ]
      },
      {
       "column": "B",
       "header": "كود الخامة",
       "kind": "input",
       "examples": [
        "R08",
        "R06",
        "R10"
       ],
       "allowed_values": {
        "from_range": "'الخامات'!$A$6:$A$65"
       }
      },
      {
       "column": "C",
       "header": "الكمية (وحدة الاستعمال)",
       "kind": "input",
       "examples": [
        1200,
        3000,
        6000
       ]
      },
      {
       "column": "D",
       "header": "السبب",
       "kind": "input",
       "examples": [
        "تالف/فاسد",
        "تالف/فاسد",
        "منتهي الصلاحية"
       ],
       "allowed_values": {
        "from_range": "'الإعدادات'!$F$5:$F$10"
       }
      },
      {
       "column": "E",
       "header": "ملاحظة",
       "kind": "input",
       "examples": [
        "ورق ذابل",
        "طماطم طرية",
        "كرتونة قديمة"
       ]
      },
      {
       "column": "F",
       "header": "اسم الخامة",
       "kind": "formula",
       "formula_row_1": "=IF(B6&\"\"=\"\",\"\",IFERROR(INDEX('الخامات'!$B$6:$B$65,MATCH(B6&\"\",'الخامات'!$A$6:$A$65,0))&\"\",\"كود غير موجود\"))"
      },
      {
       "column": "G",
       "header": "وحدة الاستعمال",
       "kind": "formula",
       "formula_row_1": "=IF(B6&\"\"=\"\",\"\",IFERROR(INDEX('الخامات'!$E$6:$E$65,MATCH(B6&\"\",'الخامات'!$A$6:$A$65,0))&\"\",\"\"))"
      },
      {
       "column": "H",
       "header": "قيمة الهالك",
       "kind": "formula",
       "formula_row_1": "=IF(B6&\"\"=\"\",\"\",IFERROR(ROUND(N(C6)*INDEX('الخامات'!$J$6:$J$65,MATCH(B6&\"\",'الخامات'!$A$6:$A$65,0)),2),0))"
      },
      {
       "column": "I",
       "header": "التصنيف",
       "kind": "formula",
       "formula_row_1": "=IF(B6&\"\"=\"\",\"\",IFERROR(INDEX('الخامات'!$C$6:$C$65,MATCH(B6&\"\",'الخامات'!$A$6:$A$65,0))&\"\",\"\"))"
      }
     ]
    }
   ]
  },
  {
   "name": "الجرد اليومي",
   "formula_cells": 2000,
   "record_tables": [
    {
     "header_row": 5,
     "first_record_row": 6,
     "sample_rows_filled": 17,
     "capacity_last_row": 405,
     "columns": [
      {
       "column": "A",
       "header": "تاريخ الجرد",
       "kind": "input",
       "examples": [
        "2026-10-24",
        "2026-10-24",
        "2026-10-24"
       ]
      },
      {
       "column": "B",
       "header": "كود الخامة",
       "kind": "input",
       "examples": [
        "R01",
        "R02",
        "R09"
       ],
       "allowed_values": {
        "from_range": "'الخامات'!$A$6:$A$65"
       }
      },
      {
       "column": "C",
       "header": "الكمية المعدودة",
       "kind": "input",
       "examples": [
        84050,
        24476,
        15590
       ]
      },
      {
       "column": "D",
       "header": "ملاحظة",
       "kind": "input",
       "examples": [
        "جرد منتصف الشهر",
        "جرد منتصف الشهر",
        "جرد منتصف الشهر"
       ]
      },
      {
       "column": "E",
       "header": "اسم الخامة",
       "kind": "formula",
       "formula_row_1": "=IF(B6&\"\"=\"\",\"\",IFERROR(INDEX('الخامات'!$B$6:$B$65,MATCH(B6&\"\",'الخامات'!$A$6:$A$65,0))&\"\",\"كود غير موجود\"))"
      },
      {
       "column": "F",
       "header": "الرصيد الدفتري في ذلك اليوم",
       "kind": "formula",
       "formula_row_1": "=IF(OR(B6&\"\"=\"\",NOT(ISNUMBER(A6))),\"\",IFERROR(N(INDEX('الخامات'!$H$6:$H$65,MATCH(B6&\"\",'الخامات'!$A$6:$A$65,0)))+SUMIFS('المشتريات'!$I$6:$I$305,'المشتريات'!$B$6:$B$305,B6&\"\",'المشتريات'!$A$6:$A$305,\"<=\"&A6)-SUMIFS('الصرف للمطبخ'!$C$6:$C$605,'الصرف للمطبخ'!$B$6:$B$605,B6&\"\",'الصرف للمطبخ'!$A$6:$A$605,\"<=\"&A6)-SUMIFS('الهالك'!$C$6:$C$305,'الهالك'!$B$6:$B$305,B6&\"\",'الهالك'!$A$6:$A$305,\"<=\"&A6),\"\"))"
      },
      {
       "column": "G",
       "header": "الفرق (عدّ - دفتر)",
       "kind": "formula",
       "formula_row_1": "=IF(F6=\"\",\"\",N(C6)-F6)"
      },
      {
       "column": "H",
       "header": "قيمة الفرق",
       "kind": "formula",
       "formula_row_1": "=IF(G6=\"\",\"\",IFERROR(ROUND(G6*INDEX('الخامات'!$J$6:$J$65,MATCH(B6&\"\",'الخامات'!$A$6:$A$65,0)),2),0))"
      },
      {
       "column": "I",
       "header": "آخر جرد؟",
       "kind": "formula",
       "formula_row_1": "=IF(OR(B6&\"\"=\"\",NOT(ISNUMBER(A6))),\"\",IF(COUNTIFS($B$6:$B$405,B6&\"\",$A$6:$A$405,\">\"&A6)=0,1,0))"
      }
     ]
    }
   ]
  },
  {
   "name": "الأطباق",
   "formula_cells": 180,
   "record_tables": [
    {
     "header_row": 5,
     "first_record_row": 6,
     "sample_rows_filled": 8,
     "capacity_last_row": 35,
     "columns": [
      {
       "column": "A",
       "header": "الطبق",
       "kind": "input",
       "examples": [
        "برجر لحم",
        "فراخ مشوية بالأرز",
        "بيتزا مارجريتا"
       ]
      },
      {
       "column": "B",
       "header": "سعر البيع",
       "kind": "input",
       "examples": [
        140,
        130,
        110
       ]
      },
      {
       "column": "C",
       "header": "عدد الأطباق المباعة",
       "kind": "input",
       "examples": [
        620,
        480,
        350
       ]
      },
      {
       "column": "D",
       "header": "المبيعات",
       "kind": "formula",
       "formula_row_1": "=IF(A6&\"\"=\"\",\"\",ROUND(N(B6)*N(C6),2))"
      },
      {
       "column": "E",
       "header": "تكلفة الطبق من الوصفة",
       "kind": "formula",
       "formula_row_1": "=IF(A6&\"\"=\"\",\"\",ROUND(SUMIFS('الوصفات'!$E$6:$E$155,'الوصفات'!$A$6:$A$155,A6&\"\"),2))"
      },
      {
       "column": "F",
       "header": "نسبة التكلفة",
       "kind": "formula",
       "formula_row_1": "=IF(A6&\"\"=\"\",\"\",IF(N(B6)>0,E6/B6,\"\"))"
      },
      {
       "column": "G",
       "header": "التكلفة النظرية للمباع",
       "kind": "formula",
       "formula_row_1": "=IF(A6&\"\"=\"\",\"\",ROUND(E6*N(C6),2))"
      },
      {
       "column": "H",
       "header": "ربح الطبق",
       "kind": "formula",
       "formula_row_1": "=IF(A6&\"\"=\"\",\"\",N(B6)-E6)"
      },
      {
       "column": "I",
       "header": "مقارنة بالهدف",
       "kind": "formula",
       "formula_row_1": "=IF(OR(A6&\"\"=\"\",F6=\"\"),\"\",IF(F6>'الإعدادات'!$B$6,\"فوق الهدف\",\"ضمن الهدف\"))"
      }
     ]
    }
   ]
  },
  {
   "name": "الوصفات",
   "formula_cells": 750,
   "record_tables": [
    {
     "header_row": 5,
     "first_record_row": 6,
     "sample_rows_filled": 26,
     "capacity_last_row": 155,
     "columns": [
      {
       "column": "A",
       "header": "الطبق",
       "kind": "input",
       "examples": [
        "برجر لحم",
        "برجر لحم",
        "برجر لحم"
       ],
       "allowed_values": {
        "from_range": "'الأطباق'!$A$6:$A$35"
       }
      },
      {
       "column": "B",
       "header": "كود الخامة",
       "kind": "input",
       "examples": [
        "R02",
        "R12",
        "R03"
       ],
       "allowed_values": {
        "from_range": "'الخامات'!$A$6:$A$65"
       }
      },
      {
       "column": "C",
       "header": "الكمية في الطبق (وحدة الاستعمال)",
       "kind": "input",
       "examples": [
        180,
        1,
        30
       ]
      },
      {
       "column": "D",
       "header": "اسم الخامة",
       "kind": "formula",
       "formula_row_1": "=IF(B6&\"\"=\"\",\"\",IFERROR(INDEX('الخامات'!$B$6:$B$65,MATCH(B6&\"\",'الخامات'!$A$6:$A$65,0))&\"\",\"كود غير موجود\"))"
      },
      {
       "column": "E",
       "header": "تكلفة الخامة في الطبق",
       "kind": "formula",
       "formula_row_1": "=IF(B6&\"\"=\"\",\"\",IFERROR(N(C6)*INDEX('الخامات'!$J$6:$J$65,MATCH(B6&\"\",'الخامات'!$A$6:$A$65,0)),0))"
      },
      {
       "column": "F",
       "header": "الأطباق المباعة",
       "kind": "formula",
       "formula_row_1": "=IF(B6&\"\"=\"\",\"\",IFERROR(INDEX('الأطباق'!$C$6:$C$35,MATCH(A6&\"\",'الأطباق'!$A$6:$A$35,0)),0))"
      },
      {
       "column": "G",
       "header": "الاستهلاك النظري (وحدة استعمال)",
       "kind": "formula",
       "formula_row_1": "=IF(B6&\"\"=\"\",\"\",N(C6)*F6)"
      },
      {
       "column": "H",
       "header": "التكلفة النظرية",
       "kind": "formula",
       "formula_row_1": "=IF(B6&\"\"=\"\",\"\",ROUND(E6*F6,2))"
      }
     ]
    }
   ]
  },
  {
   "name": "الفعلي والنظري",
   "formula_cells": 541,
   "record_tables": [
    {
     "header_row": 5,
     "first_record_row": 6,
     "sample_rows_filled": 0,
     "capacity_last_row": 65,
     "columns": [
      {
       "column": "A",
       "header": "الكود",
       "kind": "formula",
       "formula_row_1": "=IF('الخامات'!A6&\"\"=\"\",\"\",'الخامات'!A6)"
      },
      {
       "column": "B",
       "header": "الخامة",
       "kind": "formula",
       "formula_row_1": "=IF(A6=\"\",\"\",'الخامات'!B6)"
      },
      {
       "column": "C",
       "header": "وحدة الاستعمال",
       "kind": "formula",
       "formula_row_1": "=IF(A6=\"\",\"\",'الخامات'!E6)"
      },
      {
       "column": "D",
       "header": "الاستهلاك النظري (من المبيعات)",
       "kind": "formula",
       "formula_row_1": "=IF(A6=\"\",\"\",SUMIFS('الوصفات'!$G$6:$G$155,'الوصفات'!$B$6:$B$155,A6&\"\"))"
      },
      {
       "column": "E",
       "header": "المنصرف الفعلي للمطبخ",
       "kind": "formula",
       "formula_row_1": "=IF(A6=\"\",\"\",'الخامات'!L6)"
      },
      {
       "column": "F",
       "header": "الفرق (كمية)",
       "kind": "formula",
       "formula_row_1": "=IF(A6=\"\",\"\",E6-D6)"
      },
      {
       "column": "G",
       "header": "الفرق (قيمة)",
       "kind": "formula",
       "formula_row_1": "=IF(A6=\"\",\"\",ROUND(F6*'الخامات'!J6,2))"
      },
      {
       "column": "H",
       "header": "الفرق % من النظري",
       "kind": "formula",
       "formula_row_1": "=IF(OR(A6=\"\",N(D6)=0),\"\",F6/D6)"
      },
      {
       "column": "I",
       "header": "الحكم",
       "kind": "formula",
       "formula_row_1": "=IF(A6=\"\",\"\",IF(N(D6)=0,IF(N(E6)>0,\"بلا وصفة\",\"\"),IF(ABS(H6)>'الإعدادات'!$B$8,\"راجع\",\"ضمن الحد\")))"
      }
     ]
    }
   ],
   "results": [
    {
     "label": "إجمالي فرق القيمة (المنصرف - النظري)",
     "cell": "B3",
     "formula": "=SUM(G6:G65)"
    }
   ]
  },
  {
   "name": "طلب الشراء",
   "formula_cells": 402,
   "record_tables": [
    {
     "header_row": 6,
     "first_record_row": 7,
     "sample_rows_filled": 0,
     "capacity_last_row": 46,
     "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$65,MATCH($A7,'الخامات'!$S$6:$S$65,0))&\"\")"
      },
      {
       "column": "C",
       "header": "الخامة",
       "kind": "formula",
       "formula_row_1": "=IF($A7=\"\",\"\",INDEX('الخامات'!$B$6:$B$65,MATCH($A7,'الخامات'!$S$6:$S$65,0))&\"\")"
      },
      {
       "column": "D",
       "header": "وحدة الشراء",
       "kind": "formula",
       "formula_row_1": "=IF($A7=\"\",\"\",INDEX('الخامات'!$D$6:$D$65,MATCH($A7,'الخامات'!$S$6:$S$65,0))&\"\")"
      },
      {
       "column": "E",
       "header": "الرصيد (استعمال)",
       "kind": "formula",
       "formula_row_1": "=IF($A7=\"\",\"\",INDEX('الخامات'!$N$6:$N$65,MATCH($A7,'الخامات'!$S$6:$S$65,0)))"
      },
      {
       "column": "F",
       "header": "حد الـ par",
       "kind": "formula",
       "formula_row_1": "=IF($A7=\"\",\"\",INDEX('الخامات'!$I$6:$I$65,MATCH($A7,'الخامات'!$S$6:$S$65,0)))"
      },
      {
       "column": "G",
       "header": "الكمية المقترحة (شراء)",
       "kind": "formula",
       "formula_row_1": "=IF($A7=\"\",\"\",INDEX('الخامات'!$Q$6:$Q$65,MATCH($A7,'الخامات'!$S$6:$S$65,0)))"
      },
      {
       "column": "H",
       "header": "سعر الوحدة",
       "kind": "formula",
       "formula_row_1": "=IF($A7=\"\",\"\",INDEX('الخامات'!$G$6:$G$65,MATCH($A7,'الخامات'!$S$6:$S$65,0)))"
      },
      {
       "column": "I",
       "header": "تكلفة الطلب",
       "kind": "formula",
       "formula_row_1": "=IF($A7=\"\",\"\",INDEX('الخامات'!$R$6:$R$65,MATCH($A7,'الخامات'!$S$6:$S$65,0)))"
      },
      {
       "column": "J",
       "header": "الحالة",
       "kind": "formula",
       "formula_row_1": "=IF($A7=\"\",\"\",INDEX('الخامات'!$P$6:$P$65,MATCH($A7,'الخامات'!$S$6:$S$65,0))&\"\")"
      }
     ]
    }
   ],
   "results": [
    {
     "label": "عدد الخامات المطلوب طلبها",
     "cell": "B4",
     "formula": "=COUNT('الخامات'!$S$6:$S$65)"
    },
    {
     "label": "تكلفة الطلب التقديرية",
     "cell": "B5",
     "formula": "=SUM(I7:I46)"
    }
   ]
  },
  {
   "name": "الملخص",
   "formula_cells": 82,
   "record_tables": [
    {
     "header_row": 31,
     "first_record_row": 32,
     "sample_rows_filled": 0,
     "capacity_last_row": 57,
     "columns": [
      {
       "column": "A",
       "header": "السبب",
       "kind": "formula",
       "formula_row_1": "='الإعدادات'!F5"
      },
      {
       "column": "B",
       "header": "عدد البنود",
       "kind": "formula",
       "formula_row_1": "=COUNTIF('الهالك'!$D$6:$D$305,A32)"
      },
      {
       "column": "C",
       "header": "القيمة",
       "kind": "formula",
       "formula_row_1": "=SUMIFS('الهالك'!$H$6:$H$305,'الهالك'!$D$6:$D$305,A32)"
      },
      {
       "column": "D",
       "header": "النسبة",
       "kind": "formula",
       "formula_row_1": "=IF($B$7=0,\"\",C32/$B$7)"
      }
     ]
    }
   ],
   "results": [
    {
     "label": "مبيعات الأطباق المسجلة",
     "cell": "B5",
     "formula": "=SUM('الأطباق'!$D$6:$D$35)"
    },
    {
     "label": "قيمة المنصرف للمطبخ (فعلي)",
     "cell": "B6",
     "formula": "=SUM('الصرف للمطبخ'!$H$6:$H$605)"
    },
    {
     "label": "قيمة الهالك",
     "cell": "B7",
     "formula": "=SUM('الهالك'!$H$6:$H$305)"
    },
    {
     "label": "تكلفة الغذاء الفعلية (منصرف + هالك)",
     "cell": "B8",
     "formula": "=B6+B7"
    },
    {
     "label": "نسبة تكلفة الغذاء الفعلية",
     "cell": "B9",
     "formula": "=IF(B5=0,\"\",B8/B5)"
    },
    {
     "label": "التكلفة النظرية من الوصفات",
     "cell": "B10",
     "formula": "=SUM('الوصفات'!$H$6:$H$155)"
    },
    {
     "label": "نسبة تكلفة الغذاء النظرية",
     "cell": "B11",
     "formula": "=IF(B5=0,\"\",B10/B5)"
    },
    {
     "label": "هدف نسبة تكلفة الغذاء",
     "cell": "B12",
     "formula": "='الإعدادات'!$B$6"
    },
    {
     "label": "فرق المنصرف عن النظري (قيمة)",
     "cell": "B13",
     "formula": "=B6-B10"
    },
    {
     "label": "فرق المنصرف عن النظري % من النظري",
     "cell": "B14",
     "formula": "=IF(B10=0,\"\",B13/B10)"
    },
    {
     "label": "قيمة المشتريات",
     "cell": "B17",
     "formula": "=SUM('المشتريات'!$J$6:$J$305)"
    },
    {
     "label": "الهالك % من المشتريات",
     "cell": "B18",
     "formula": "=IF(B17=0,\"\",B7/B17)"
    },
    {
     "label": "الهالك % من المبيعات",
     "cell": "B19",
     "formula": "=IF(B5=0,\"\",B7/B5)"
    },
    {
     "label": "قيمة المخزون الدفتري",
     "cell": "B20",
     "formula": "=SUM('الخامات'!$O$6:$O$65)"
    },
    {
     "label": "فرق الجرد (آخر جرد لكل خامة)",
     "cell": "B21",
     "formula": "=SUM('الخامات'!$Z$6:$Z$65)"
    },
    {
     "label": "خامات تحت حد الـ par (اطلب)",
     "cell": "B24",
     "formula": "=COUNTIF('الخامات'!$P$6:$P$65,\"اطلب\")"
    },
    {
     "label": "خامات نفدت",
     "cell": "B25",
     "formula": "=COUNTIF('الخامات'!$P$6:$P$65,\"نفد\")"
    },
    {
     "label": "تكلفة طلب الشراء",
     "cell": "B26",
     "formula": "='طلب الشراء'!B5"
    },
    {
     "label": "أطباق نسبة تكلفتها فوق الهدف",
     "cell": "B27",
     "formula": "=COUNTIF('الأطباق'!$I$6:$I$35,\"فوق الهدف\")"
    },
    {
     "label": "خامات فرق صرفها خارج الحد (راجع)",
     "cell": "B28",
     "formula": "=COUNTIF('الفعلي والنظري'!$I$6:$I$65,\"راجع\")"
    }
   ]
  },
  {
   "name": "لماذا ما زلت على إكسل؟",
   "formula_cells": 0
  }
 ]
}