{
 "id": "restaurant-recipe-costing",
 "file": "softwiro-restaurant-recipe-costing.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": 0.3
    },
    {
     "label": "مكون لتجربة ارتفاع سعره",
     "cell": "B5",
     "value": "جبنة موتزاريلا"
    },
    {
     "label": "نسبة الزيادة المتوقعة",
     "cell": "B6",
     "value": 0.25
    }
   ]
  },
  {
   "name": "المكونات",
   "formula_cells": 300,
   "record_tables": [
    {
     "header_row": 5,
     "first_record_row": 6,
     "sample_rows_filled": 15,
     "capacity_last_row": 305,
     "columns": [
      {
       "column": "A",
       "header": "اسم المكون",
       "kind": "input",
       "examples": [
        "دجاج",
        "أرز",
        "لحم مفروم"
       ]
      },
      {
       "column": "B",
       "header": "الوحدة",
       "kind": "input",
       "examples": [
        "كجم",
        "كجم",
        "كجم"
       ],
       "allowed_values": [
        "كجم",
        "لتر",
        "قطعة",
        "علبة",
        "جرام"
       ]
      },
      {
       "column": "C",
       "header": "سعر الوحدة",
       "kind": "input",
       "examples": [
        110,
        35,
        380
       ]
      },
      {
       "column": "D",
       "header": "عدد الأطباق المستخدم فيها",
       "kind": "formula",
       "formula_row_1": "=IF(A6&\"\"=\"\",\"\",COUNTIFS('الوصفات'!$B$6:$B$1005,A6&\"\"))"
      }
     ]
    }
   ]
  },
  {
   "name": "الأطباق",
   "formula_cells": 2200,
   "record_tables": [
    {
     "header_row": 5,
     "first_record_row": 6,
     "sample_rows_filled": 8,
     "capacity_last_row": 205,
     "columns": [
      {
       "column": "A",
       "header": "الطبق",
       "kind": "input",
       "examples": [
        "فراخ مشوية بالأرز",
        "برجر لحم",
        "بيتزا مارجريتا"
       ]
      },
      {
       "column": "B",
       "header": "سعر البيع الفعلي",
       "kind": "input",
       "examples": [
        140,
        180,
        150
       ]
      },
      {
       "column": "C",
       "header": "عدد المكونات",
       "kind": "formula",
       "formula_row_1": "=IF(A6&\"\"=\"\",\"\",COUNTIFS('الوصفات'!$A$6:$A$1005,A6&\"\"))"
      },
      {
       "column": "D",
       "header": "تكلفة الطبق",
       "kind": "formula",
       "formula_row_1": "=IF(A6&\"\"=\"\",\"\",IF(C6=0,\"\",ROUND(SUMIFS('الوصفات'!$F$6:$F$1005,'الوصفات'!$A$6:$A$1005,A6&\"\"),2)))"
      },
      {
       "column": "E",
       "header": "سعر البيع المقترح",
       "kind": "formula",
       "formula_row_1": "=IF(OR(D6=\"\",N('الإعدادات'!$B$4)<=0),\"\",ROUNDUP(ROUND(D6/'الإعدادات'!$B$4,4),0))"
      },
      {
       "column": "F",
       "header": "هامش الربح",
       "kind": "formula",
       "formula_row_1": "=IF(AND(ISNUMBER(D6),N(B6)>0),ROUND(B6-D6,2),\"\")"
      },
      {
       "column": "G",
       "header": "نسبة التكلفة",
       "kind": "formula",
       "formula_row_1": "=IF(F6=\"\",\"\",ROUND(D6/B6,4))"
      },
      {
       "column": "H",
       "header": "نسبة الهامش",
       "kind": "formula",
       "formula_row_1": "=IF(F6=\"\",\"\",ROUND(F6/B6,4))"
      },
      {
       "column": "I",
       "header": "الحالة",
       "kind": "formula",
       "formula_row_1": "=IF(A6&\"\"=\"\",\"\",IF(C6=0,\"بدون وصفة\",IF(F6=\"\",\"بدون سعر\",IF(G6>'الإعدادات'!$B$4,\"فوق المستهدف\",\"ضمن المستهدف\"))))"
      },
      {
       "column": "J",
       "header": "التكلفة بعد الزيادة",
       "kind": "formula",
       "formula_row_1": "=IF(D6=\"\",\"\",ROUND(SUMIFS('الوصفات'!$G$6:$G$1005,'الوصفات'!$A$6:$A$1005,A6&\"\"),2))"
      },
      {
       "column": "K",
       "header": "نسبة التكلفة بعد الزيادة",
       "kind": "formula",
       "formula_row_1": "=IF(AND(ISNUMBER(J6),F6<>\"\"),ROUND(J6/B6,4),\"\")"
      },
      {
       "column": "L",
       "header": "زيادة التكلفة",
       "kind": "formula",
       "formula_row_1": "=IF(J6=\"\",\"\",ROUND(J6-D6,2))"
      },
      {
       "column": "M",
       "header": "ترتيب الربحية",
       "kind": "formula",
       "formula_row_1": "=IF(F6=\"\",\"\",COUNTIFS($F$6:$F$205,\">\"&F6)+COUNTIFS($F$6:F6,F6))"
      }
     ]
    }
   ]
  },
  {
   "name": "الوصفات",
   "formula_cells": 4000,
   "record_tables": [
    {
     "header_row": 5,
     "first_record_row": 6,
     "sample_rows_filled": 27,
     "capacity_last_row": 1005,
     "columns": [
      {
       "column": "A",
       "header": "الطبق",
       "kind": "input",
       "examples": [
        "فراخ مشوية بالأرز",
        "فراخ مشوية بالأرز",
        "فراخ مشوية بالأرز"
       ],
       "allowed_values": {
        "from_range": "'الأطباق'!$A$6:$A$205"
       }
      },
      {
       "column": "B",
       "header": "المكون",
       "kind": "input",
       "examples": [
        "دجاج",
        "أرز",
        "زيت"
       ],
       "allowed_values": {
        "from_range": "'المكونات'!$A$6:$A$305"
       }
      },
      {
       "column": "C",
       "header": "الكمية",
       "kind": "input",
       "examples": [
        0.35,
        0.15,
        0.02
       ]
      },
      {
       "column": "D",
       "header": "الوحدة",
       "kind": "formula",
       "formula_row_1": "=IF(B6&\"\"=\"\",\"\",IFERROR(INDEX('المكونات'!$B$6:$B$305,MATCH(B6&\"\",'المكونات'!$A$6:$A$305,0))&\"\",\"مكون غير موجود\"))"
      },
      {
       "column": "E",
       "header": "سعر الوحدة",
       "kind": "formula",
       "formula_row_1": "=IF(B6&\"\"=\"\",\"\",IFERROR(INDEX('المكونات'!$C$6:$C$305,MATCH(B6&\"\",'المكونات'!$A$6:$A$305,0)),\"\"))"
      },
      {
       "column": "F",
       "header": "تكلفة السطر",
       "kind": "formula",
       "formula_row_1": "=IF(AND(ISNUMBER(E6),ISNUMBER(C6)),ROUND(C6*E6,4),\"\")"
      },
      {
       "column": "G",
       "header": "التكلفة بعد الزيادة",
       "kind": "formula",
       "formula_row_1": "=IF(ISNUMBER(F6),IF(B6&\"\"='الإعدادات'!$B$5&\"\",ROUND(F6*(1+N('الإعدادات'!$B$6)),4),F6),\"\")"
      }
     ]
    }
   ]
  },
  {
   "name": "الملخص",
   "formula_cells": 35,
   "record_tables": [
    {
     "header_row": 15,
     "first_record_row": 16,
     "sample_rows_filled": 0,
     "capacity_last_row": 33,
     "columns": [
      {
       "column": "A",
       "header": "الطبق",
       "kind": "formula",
       "formula_row_1": "=IF($B$7<1,\"\",INDEX('الأطباق'!$A$6:$A$205,MATCH(1,'الأطباق'!$M$6:$M$205,0)))"
      },
      {
       "column": "B",
       "header": "هامش الربح",
       "kind": "formula",
       "formula_row_1": "=IF($B$7<1,\"\",INDEX('الأطباق'!$F$6:$F$205,MATCH(1,'الأطباق'!$M$6:$M$205,0)))"
      },
      {
       "column": "C",
       "header": "نسبة التكلفة",
       "kind": "formula",
       "formula_row_1": "=IF($B$7<1,\"\",INDEX('الأطباق'!$G$6:$G$205,MATCH(1,'الأطباق'!$M$6:$M$205,0)))"
      }
     ]
    }
   ],
   "results": [
    {
     "label": "نسبة التكلفة المستهدفة",
     "cell": "B5",
     "formula": "='الإعدادات'!$B$4"
    },
    {
     "label": "عدد الأطباق",
     "cell": "B6",
     "formula": "=COUNTIF('الأطباق'!$A$6:$A$205,\"?*\")"
    },
    {
     "label": "أطباق لها وصفة وسعر بيع",
     "cell": "B7",
     "formula": "=COUNT('الأطباق'!$F$6:$F$205)"
    },
    {
     "label": "أطباق فوق النسبة المستهدفة",
     "cell": "B8",
     "formula": "=COUNTIF('الأطباق'!$I$6:$I$205,\"فوق المستهدف\")"
    },
    {
     "label": "أطباق بدون وصفة",
     "cell": "B9",
     "formula": "=COUNTIF('الأطباق'!$I$6:$I$205,\"بدون وصفة\")"
    },
    {
     "label": "أطباق بدون سعر بيع",
     "cell": "B10",
     "formula": "=COUNTIF('الأطباق'!$I$6:$I$205,\"بدون سعر\")"
    },
    {
     "label": "متوسط نسبة التكلفة",
     "cell": "B11",
     "formula": "=IF(B7=0,\"\",AVERAGE('الأطباق'!$G$6:$G$205))"
    },
    {
     "label": "متوسط هامش الربح للطبق",
     "cell": "B12",
     "formula": "=IF(B7=0,\"\",AVERAGE('الأطباق'!$F$6:$F$205))"
    }
   ]
  },
  {
   "name": "لماذا ما زلت على إكسل؟",
   "formula_cells": 0
  }
 ]
}