{
 "id": "electronics-store",
 "file": "softwiro-electronics-store.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-15"
    },
    {
     "label": "تنبيه انتهاء الضمان: عدد الأيام قبل النهاية",
     "cell": "B5",
     "value": 30
    },
    {
     "label": "تأخر الصيانة: عدد الأيام المفتوحة",
     "cell": "B6",
     "value": 14
    },
    {
     "label": "أول شهر في الملخص (اكتب أي يوم منه)",
     "cell": "B7",
     "value": "2026-09-01"
    }
   ]
  },
  {
   "name": "الموديلات",
   "formula_cells": 900,
   "record_tables": [
    {
     "header_row": 5,
     "first_record_row": 6,
     "sample_rows_filled": 8,
     "capacity_last_row": 105,
     "columns": [
      {
       "column": "A",
       "header": "الكود",
       "kind": "input",
       "examples": [
        "M01",
        "M02",
        "M03"
       ]
      },
      {
       "column": "B",
       "header": "الماركة",
       "kind": "input",
       "examples": [
        "سامسونج",
        "سامسونج",
        "شاومي"
       ],
       "allowed_values": {
        "from_range": "'الإعدادات'!$D$5:$D$16"
       }
      },
      {
       "column": "C",
       "header": "الموديل",
       "kind": "input",
       "examples": [
        "Galaxy A15 128GB",
        "Galaxy A55 256GB",
        "Redmi Note 13"
       ]
      },
      {
       "column": "D",
       "header": "الفئة",
       "kind": "input",
       "examples": [
        "موبايل",
        "موبايل",
        "موبايل"
       ],
       "allowed_values": {
        "from_range": "'الإعدادات'!$F$5:$F$14"
       }
      },
      {
       "column": "E",
       "header": "سعر الشراء",
       "kind": "input",
       "examples": [
        6400,
        14500,
        8200
       ]
      },
      {
       "column": "F",
       "header": "سعر البيع",
       "kind": "input",
       "examples": [
        7200,
        16200,
        9100
       ]
      },
      {
       "column": "G",
       "header": "الضمان (شهر)",
       "kind": "input",
       "examples": [
        12,
        12,
        12
       ]
      },
      {
       "column": "H",
       "header": "الحد الأدنى",
       "kind": "input",
       "examples": [
        2,
        1,
        2
       ]
      },
      {
       "column": "I",
       "header": "استُلم",
       "kind": "formula",
       "formula_row_1": "=IF(A6&\"\"=\"\",\"\",COUNTIF('السيريال'!$B$6:$B$505,A6&\"\"))"
      },
      {
       "column": "J",
       "header": "بيع",
       "kind": "formula",
       "formula_row_1": "=IF(A6&\"\"=\"\",\"\",COUNTIFS('السيريال'!$B$6:$B$505,A6&\"\",'السيريال'!$G$6:$G$505,\"مباع\"))"
      },
      {
       "column": "K",
       "header": "الرصيد",
       "kind": "formula",
       "formula_row_1": "=IF(A6&\"\"=\"\",\"\",I6-J6)"
      },
      {
       "column": "L",
       "header": "قيمة المخزون (تكلفة)",
       "kind": "formula",
       "formula_row_1": "=IF(A6&\"\"=\"\",\"\",ROUND(SUMIFS('السيريال'!$E$6:$E$505,'السيريال'!$B$6:$B$505,A6&\"\",'السيريال'!$G$6:$G$505,\"في المخزن\"),2))"
      },
      {
       "column": "M",
       "header": "ربح الوحدة",
       "kind": "formula",
       "formula_row_1": "=IF(A6&\"\"=\"\",\"\",N(F6)-N(E6))"
      },
      {
       "column": "N",
       "header": "هامش الربح",
       "kind": "formula",
       "formula_row_1": "=IF(A6&\"\"=\"\",\"\",IF(N(F6)>0,(F6-E6)/F6,\"\"))"
      },
      {
       "column": "O",
       "header": "صافي المبيعات",
       "kind": "formula",
       "formula_row_1": "=IF(A6&\"\"=\"\",\"\",ROUND(SUMIFS('المبيعات'!$I$6:$I$505,'المبيعات'!$G$6:$G$505,A6&\"\"),2))"
      },
      {
       "column": "P",
       "header": "ربح المبيعات",
       "kind": "formula",
       "formula_row_1": "=IF(A6&\"\"=\"\",\"\",ROUND(SUMIFS('المبيعات'!$K$6:$K$505,'المبيعات'!$G$6:$G$505,A6&\"\"),2))"
      },
      {
       "column": "Q",
       "header": "الحالة",
       "kind": "formula",
       "formula_row_1": "=IF(A6&\"\"=\"\",\"\",IF(K6<=0,\"نفد\",IF(K6<N(H6),\"اطلب\",\"متوفر\")))"
      }
     ]
    }
   ]
  },
  {
   "name": "السيريال",
   "formula_cells": 3000,
   "record_tables": [
    {
     "header_row": 5,
     "first_record_row": 6,
     "sample_rows_filled": 30,
     "capacity_last_row": 505,
     "columns": [
      {
       "column": "A",
       "header": "السيريال / IMEI",
       "kind": "input",
       "examples": [
        "R5R58VJ5HSU",
        "R5CTWNMNKJR",
        "R5ZHELE9NK7"
       ]
      },
      {
       "column": "B",
       "header": "كود الموديل",
       "kind": "input",
       "examples": [
        "M01",
        "M01",
        "M01"
       ],
       "allowed_values": {
        "from_range": "'الموديلات'!$A$6:$A$105"
       }
      },
      {
       "column": "C",
       "header": "المورد",
       "kind": "input",
       "examples": [
        "شركة النيل للموبايل",
        "شركة النيل للموبايل",
        "شركة النيل للموبايل"
       ]
      },
      {
       "column": "D",
       "header": "تاريخ الشراء",
       "kind": "input",
       "examples": [
        "2026-10-01",
        "2026-10-01",
        "2026-10-01"
       ]
      },
      {
       "column": "E",
       "header": "تكلفة الشراء",
       "kind": "input",
       "examples": [
        6400,
        6400,
        6400
       ]
      },
      {
       "column": "F",
       "header": "الجهاز",
       "kind": "formula",
       "formula_row_1": "=IF(A6&\"\"=\"\",\"\",IFERROR(INDEX('الموديلات'!$B$6:$B$105,MATCH(B6&\"\",'الموديلات'!$A$6:$A$105,0))&\" \"&INDEX('الموديلات'!$C$6:$C$105,MATCH(B6&\"\",'الموديلات'!$A$6:$A$105,0)),\"موديل غير موجود\"))"
      },
      {
       "column": "G",
       "header": "الحالة",
       "kind": "formula",
       "formula_row_1": "=IF(A6&\"\"=\"\",\"\",IF(COUNTIF('المبيعات'!$B$6:$B$505,A6&\"\")>0,\"مباع\",\"في المخزن\"))"
      },
      {
       "column": "H",
       "header": "تاريخ البيع",
       "kind": "formula",
       "formula_row_1": "=IF(G6=\"مباع\",SUMIFS('المبيعات'!$A$6:$A$505,'المبيعات'!$B$6:$B$505,A6&\"\"),\"\")"
      },
      {
       "column": "I",
       "header": "العميل",
       "kind": "formula",
       "formula_row_1": "=IF(G6=\"مباع\",IFERROR(INDEX('المبيعات'!$C$6:$C$505,MATCH(A6&\"\",'المبيعات'!$B$6:$B$505,0))&\"\",\"\"),\"\")"
      },
      {
       "column": "J",
       "header": "أيام في المخزن",
       "kind": "formula",
       "formula_row_1": "=IF(AND(G6=\"في المخزن\",ISNUMBER(D6)),'الإعدادات'!$B$4-D6,\"\")"
      },
      {
       "column": "K",
       "header": "تنبيه",
       "kind": "formula",
       "formula_row_1": "=IF(A6&\"\"=\"\",\"\",IF(COUNTIF($A$6:$A$505,A6&\"\")>1,\"سيريال مكرر\",IF(F6=\"موديل غير موجود\",\"موديل غير موجود\",\"\")))"
      }
     ]
    }
   ]
  },
  {
   "name": "المبيعات",
   "formula_cells": 5000,
   "record_tables": [
    {
     "header_row": 5,
     "first_record_row": 6,
     "sample_rows_filled": 17,
     "capacity_last_row": 505,
     "columns": [
      {
       "column": "A",
       "header": "التاريخ",
       "kind": "input",
       "examples": [
        "2026-10-05",
        "2026-10-05",
        "2026-10-07"
       ]
      },
      {
       "column": "B",
       "header": "السيريال / IMEI",
       "kind": "input",
       "examples": [
        "ACHACYH8YBR",
        "ANQD25GDCH8",
        "R5R58VJ5HSU"
       ],
       "allowed_values": {
        "from_range": "'السيريال'!$A$6:$A$505"
       }
      },
      {
       "column": "C",
       "header": "العميل",
       "kind": "input",
       "examples": [
        "أحمد جمال",
        "أحمد جمال",
        "منى عبد الله"
       ]
      },
      {
       "column": "D",
       "header": "التليفون",
       "kind": "input",
       "examples": [
        "01011122201",
        "01011122201",
        "01011122202"
       ]
      },
      {
       "column": "E",
       "header": "سعر البيع",
       "kind": "input",
       "examples": [
        450,
        1050,
        7200
       ]
      },
      {
       "column": "F",
       "header": "الخصم",
       "kind": "input",
       "examples": [
        0,
        0,
        0
       ]
      },
      {
       "column": "G",
       "header": "كود الموديل",
       "kind": "formula",
       "formula_row_1": "=IF(B6&\"\"=\"\",\"\",IFERROR(INDEX('السيريال'!$B$6:$B$505,MATCH(B6&\"\",'السيريال'!$A$6:$A$505,0))&\"\",\"\"))"
      },
      {
       "column": "H",
       "header": "الجهاز",
       "kind": "formula",
       "formula_row_1": "=IF(B6&\"\"=\"\",\"\",IFERROR(INDEX('السيريال'!$F$6:$F$505,MATCH(B6&\"\",'السيريال'!$A$6:$A$505,0)),\"سيريال غير مسجل\"))"
      },
      {
       "column": "I",
       "header": "صافي السعر",
       "kind": "formula",
       "formula_row_1": "=IF(B6&\"\"=\"\",\"\",N(E6)-N(F6))"
      },
      {
       "column": "J",
       "header": "تكلفة الجهاز",
       "kind": "formula",
       "formula_row_1": "=IF(B6&\"\"=\"\",\"\",SUMIFS('السيريال'!$E$6:$E$505,'السيريال'!$A$6:$A$505,B6&\"\"))"
      },
      {
       "column": "K",
       "header": "الربح",
       "kind": "formula",
       "formula_row_1": "=IF(B6&\"\"=\"\",\"\",I6-J6)"
      },
      {
       "column": "L",
       "header": "الضمان (شهر)",
       "kind": "formula",
       "formula_row_1": "=IF(G6=\"\",\"\",IFERROR(INDEX('الموديلات'!$G$6:$G$105,MATCH(G6,'الموديلات'!$A$6:$A$105,0)),\"\"))"
      },
      {
       "column": "M",
       "header": "نهاية الضمان",
       "kind": "formula",
       "formula_row_1": "=IF(OR(L6=\"\",NOT(ISNUMBER(A6))),\"\",EDATE(A6,L6))"
      },
      {
       "column": "N",
       "header": "الأيام المتبقية",
       "kind": "formula",
       "formula_row_1": "=IF(M6=\"\",\"\",M6-'الإعدادات'!$B$4)"
      },
      {
       "column": "O",
       "header": "حالة الضمان",
       "kind": "formula",
       "formula_row_1": "=IF(M6=\"\",\"\",IF(N6<0,\"منتهي\",IF(N6<='الإعدادات'!$B$5,\"ينتهي قريبًا\",\"ساري\")))"
      },
      {
       "column": "P",
       "header": "تنبيه",
       "kind": "formula",
       "formula_row_1": "=IF(B6&\"\"=\"\",\"\",IF(COUNTIF('السيريال'!$A$6:$A$505,B6&\"\")=0,\"سيريال غير مسجل\",IF(COUNTIF($B$6:$B$505,B6&\"\")>1,\"بيع أكثر من مرة\",IF(AND(ISNUMBER(A6),ISNUMBER(INDEX('السيريال'!$D$6:$D$505,MATCH(B6&\"\",'السيريال'!$A$6:$A$505,0))),A6<INDEX('السيريال'!$D$6:$D$505,MATCH(B6&\"\",'السيريال'!$A$6:$A$505,0))),\"بيع قبل الشراء\",IF(C6&\"\"=\"\",\"اكتب العميل\",\"\")))))"
      }
     ]
    }
   ]
  },
  {
   "name": "الصيانة",
   "formula_cells": 1200,
   "record_tables": [
    {
     "header_row": 5,
     "first_record_row": 6,
     "sample_rows_filled": 5,
     "capacity_last_row": 205,
     "columns": [
      {
       "column": "A",
       "header": "رقم التذكرة",
       "kind": "input",
       "examples": [
        "T-001",
        "T-002",
        "T-003"
       ]
      },
      {
       "column": "B",
       "header": "تاريخ الاستلام",
       "kind": "input",
       "examples": [
        "2026-10-30",
        "2026-11-03",
        "2026-11-08"
       ]
      },
      {
       "column": "C",
       "header": "السيريال / IMEI",
       "kind": "input",
       "examples": [
        "R5R58VJ5HSU",
        "ACHACYH8YBR",
        "XMQ3US22ZR3"
       ]
      },
      {
       "column": "D",
       "header": "العطل",
       "kind": "input",
       "examples": [
        "السماعة الداخلية لا تعمل",
        "الشاحن لا يشحن",
        "البطارية تفرغ بسرعة"
       ]
      },
      {
       "column": "E",
       "header": "الحالة",
       "kind": "input",
       "examples": [
        "عند الوكيل",
        "تم التسليم",
        "جاهز للتسليم"
       ],
       "allowed_values": [
        "استلام",
        "عند الوكيل",
        "جاهز للتسليم",
        "تم التسليم"
       ]
      },
      {
       "column": "F",
       "header": "إرسال للوكيل",
       "kind": "input",
       "examples": [
        "2026-11-01",
        "2026-11-09",
        "2026-11-03"
       ]
      },
      {
       "column": "G",
       "header": "رجوع من الوكيل",
       "kind": "input",
       "examples": [
        "2026-11-13",
        "2026-11-08"
       ]
      },
      {
       "column": "H",
       "header": "تاريخ التسليم",
       "kind": "input",
       "examples": [
        "2026-11-06",
        "2026-11-09"
       ]
      },
      {
       "column": "I",
       "header": "تكلفة الصيانة",
       "kind": "input",
       "examples": [
        0,
        320,
        0
       ]
      },
      {
       "column": "J",
       "header": "المحصّل من العميل",
       "kind": "input",
       "examples": [
        0,
        0,
        0
       ]
      },
      {
       "column": "K",
       "header": "العميل",
       "kind": "formula",
       "formula_row_1": "=IF(C6&\"\"=\"\",\"\",IFERROR(INDEX('المبيعات'!$C$6:$C$505,MATCH(C6&\"\",'المبيعات'!$B$6:$B$505,0))&\"\",\"من خارج المحل\"))"
      },
      {
       "column": "L",
       "header": "الجهاز",
       "kind": "formula",
       "formula_row_1": "=IF(C6&\"\"=\"\",\"\",IFERROR(INDEX('المبيعات'!$H$6:$H$505,MATCH(C6&\"\",'المبيعات'!$B$6:$B$505,0)),\"غير مسجل\"))"
      },
      {
       "column": "M",
       "header": "الضمان وقت الاستلام",
       "kind": "formula",
       "formula_row_1": "=IF(OR(C6&\"\"=\"\",B6&\"\"=\"\"),\"\",IFERROR(IF(B6<=INDEX('المبيعات'!$M$6:$M$505,MATCH(C6&\"\",'المبيعات'!$B$6:$B$505,0)),\"داخل الضمان\",\"خارج الضمان\"),\"من خارج المحل\"))"
      },
      {
       "column": "N",
       "header": "الأيام",
       "kind": "formula",
       "formula_row_1": "=IF(B6&\"\"=\"\",\"\",IF(ISNUMBER(H6),H6-B6,'الإعدادات'!$B$4-B6))"
      },
      {
       "column": "O",
       "header": "ربح/خسارة",
       "kind": "formula",
       "formula_row_1": "=IF(A6&\"\"=\"\",\"\",N(J6)-N(I6))"
      },
      {
       "column": "P",
       "header": "تنبيه",
       "kind": "formula",
       "formula_row_1": "=IF(A6&\"\"=\"\",\"\",IF(AND(E6=\"تم التسليم\",NOT(ISNUMBER(H6))),\"اكتب تاريخ التسليم\",IF(AND(NOT(ISNUMBER(H6)),N(N6)>'الإعدادات'!$B$6),\"متأخر\",IF(AND(M6=\"داخل الضمان\",N(J6)>0),\"راجع: داخل الضمان ومحصّل مبلغ\",\"\"))))"
      }
     ]
    }
   ]
  },
  {
   "name": "الملخص",
   "formula_cells": 103,
   "record_tables": [
    {
     "header_row": 32,
     "first_record_row": 33,
     "sample_rows_filled": 0,
     "capacity_last_row": 56,
     "columns": [
      {
       "column": "A",
       "header": "الشهر",
       "kind": "formula",
       "formula_row_1": "=YEAR(B33)&\"/\"&MONTH(B33)"
      },
      {
       "column": "B",
       "header": "بداية الشهر",
       "kind": "formula",
       "formula_row_1": "=DATE(YEAR('الإعدادات'!$B$7),MONTH('الإعدادات'!$B$7),1)"
      },
      {
       "column": "C",
       "header": "أجهزة مباعة",
       "kind": "formula",
       "formula_row_1": "=COUNTIFS('المبيعات'!$A$6:$A$505,\">=\"&B33,'المبيعات'!$A$6:$A$505,\"<\"&DATE(YEAR(B33),MONTH(B33)+1,1),'المبيعات'!$B$6:$B$505,\"?*\")"
      },
      {
       "column": "D",
       "header": "صافي المبيعات",
       "kind": "formula",
       "formula_row_1": "=SUMIFS('المبيعات'!$I$6:$I$505,'المبيعات'!$A$6:$A$505,\">=\"&B33,'المبيعات'!$A$6:$A$505,\"<\"&DATE(YEAR(B33),MONTH(B33)+1,1))"
      },
      {
       "column": "E",
       "header": "الربح",
       "kind": "formula",
       "formula_row_1": "=SUMIFS('المبيعات'!$K$6:$K$505,'المبيعات'!$A$6:$A$505,\">=\"&B33,'المبيعات'!$A$6:$A$505,\"<\"&DATE(YEAR(B33),MONTH(B33)+1,1))"
      },
      {
       "column": "F",
       "header": "صافي الصيانة",
       "kind": "formula",
       "formula_row_1": "=SUMIFS('الصيانة'!$O$6:$O$205,'الصيانة'!$H$6:$H$205,\">=\"&B33,'الصيانة'!$H$6:$H$205,\"<\"&DATE(YEAR(B33),MONTH(B33)+1,1))"
      }
     ]
    }
   ],
   "results": [
    {
     "label": "عدد الموديلات",
     "cell": "B5",
     "formula": "=COUNTIF('الموديلات'!$A$6:$A$105,\"?*\")"
    },
    {
     "label": "أجهزة في المخزن",
     "cell": "B6",
     "formula": "=COUNTIF('السيريال'!$G$6:$G$505,\"في المخزن\")"
    },
    {
     "label": "قيمة المخزون (تكلفة الشراء)",
     "cell": "B7",
     "formula": "=SUM('الموديلات'!$L$6:$L$105)"
    },
    {
     "label": "موديلات تحت الحد الأدنى (اطلب)",
     "cell": "B8",
     "formula": "=COUNTIF('الموديلات'!$Q$6:$Q$105,\"اطلب\")"
    },
    {
     "label": "موديلات نفدت",
     "cell": "B9",
     "formula": "=COUNTIF('الموديلات'!$Q$6:$Q$105,\"نفد\")"
    },
    {
     "label": "أجهزة مباعة",
     "cell": "B12",
     "formula": "=COUNTIF('المبيعات'!$B$6:$B$505,\"?*\")"
    },
    {
     "label": "صافي المبيعات",
     "cell": "B13",
     "formula": "=SUM('المبيعات'!$I$6:$I$505)"
    },
    {
     "label": "تكلفة الأجهزة المباعة",
     "cell": "B14",
     "formula": "=SUM('المبيعات'!$J$6:$J$505)"
    },
    {
     "label": "ربح المبيعات",
     "cell": "B15",
     "formula": "=SUM('المبيعات'!$K$6:$K$505)"
    },
    {
     "label": "هامش الربح",
     "cell": "B16",
     "formula": "=IF(B13=0,\"\",B15/B13)"
    },
    {
     "label": "ضمانات سارية",
     "cell": "B19",
     "formula": "=COUNTIF('المبيعات'!$O$6:$O$505,\"ساري\")"
    },
    {
     "label": "ضمانات تنتهي قريبًا",
     "cell": "B20",
     "formula": "=COUNTIF('المبيعات'!$O$6:$O$505,\"ينتهي قريبًا\")"
    },
    {
     "label": "ضمانات منتهية",
     "cell": "B21",
     "formula": "=COUNTIF('المبيعات'!$O$6:$O$505,\"منتهي\")"
    },
    {
     "label": "تذاكر مفتوحة (لم تُسلَّم)",
     "cell": "B24",
     "formula": "=COUNTIF('الصيانة'!$A$6:$A$205,\"?*\")-COUNT('الصيانة'!$H$6:$H$205)"
    },
    {
     "label": "تذاكر متأخرة",
     "cell": "B25",
     "formula": "=COUNTIF('الصيانة'!$P$6:$P$205,\"متأخر\")"
    },
    {
     "label": "تكلفة الصيانة (الوكيل)",
     "cell": "B26",
     "formula": "=SUM('الصيانة'!$I$6:$I$205)"
    },
    {
     "label": "المحصّل من العملاء",
     "cell": "B27",
     "formula": "=SUM('الصيانة'!$J$6:$J$205)"
    },
    {
     "label": "صافي الصيانة",
     "cell": "B28",
     "formula": "=B27-B26"
    },
    {
     "label": "الربح بعد الصيانة",
     "cell": "B29",
     "formula": "=B15+B28"
    }
   ]
  },
  {
   "name": "لماذا ما زلت على إكسل؟",
   "formula_cells": 0
  }
 ]
}