{
 "id": "ads-agency-client-reports",
 "file": "softwiro-ads-agency-client-reports.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,
   "record_tables": [
    {
     "header_row": 13,
     "first_record_row": 14,
     "sample_rows_filled": 9,
     "capacity_last_row": 30,
     "columns": [
      {
       "column": "A",
       "header": "العميل",
       "kind": "input",
       "examples": [
        "متجر النيل للملابس",
        "عيادة الشروق للأسنان",
        "مطعم بيت الشام"
       ]
      },
      {
       "column": "B",
       "header": "الريتينر الشهري",
       "kind": "input",
       "examples": [
        6000,
        5000,
        4000
       ],
       "allowed_values": [
        "1",
        "2",
        "3",
        "4",
        "5",
        "6",
        "7",
        "8",
        "9",
        "10",
        "11",
        "12"
       ]
      },
      {
       "column": "C",
       "header": "نسبة من الإنفاق",
       "kind": "input",
       "examples": [
        0.08,
        0.05,
        0.1
       ]
      },
      {
       "column": "D",
       "header": "الحد الأدنى للأتعاب",
       "kind": "input",
       "examples": [
        8000,
        6000,
        5000
       ]
      },
      {
       "column": "E",
       "header": "في التقرير",
       "kind": "input",
       "examples": [
        "نعم",
        "نعم",
        "نعم"
       ],
       "allowed_values": [
        "نعم",
        "لا"
       ]
      }
     ]
    }
   ],
   "settings": [
    {
     "label": "اسم الوكالة",
     "cell": "B4",
     "value": "وكالة نبض للتسويق (مثال)"
    },
    {
     "label": "السنة",
     "cell": "B5",
     "value": 2026
    },
    {
     "label": "شهر التقرير (1 إلى 12)",
     "cell": "B6",
     "value": 10
    },
    {
     "label": "تكلفة ساعة العمل الداخلية (جنيه)",
     "cell": "B7",
     "value": 250
    },
    {
     "label": "حد الهامش المنخفض (افتراض للتعديل)",
     "cell": "B8",
     "value": 0.4
    },
    {
     "label": "هدف ROAS (افتراض للتعديل)",
     "cell": "B9",
     "value": 2.5
    }
   ],
   "results": [
    {
     "label": "بداية شهر التقرير",
     "cell": "B10",
     "formula": "=DATE(B5,B6,1)"
    },
    {
     "label": "بداية الشهر التالي",
     "cell": "B11",
     "formula": "=DATE(B5,B6+1,1)"
    }
   ]
  },
  {
   "name": "الشهر",
   "formula_cells": 2400,
   "record_tables": [
    {
     "header_row": 5,
     "first_record_row": 6,
     "sample_rows_filled": 54,
     "capacity_last_row": 305,
     "columns": [
      {
       "column": "A",
       "header": "التاريخ (أي يوم في الشهر)",
       "kind": "input",
       "examples": [
        "2026-08-05",
        "2026-08-12",
        "2026-08-06"
       ]
      },
      {
       "column": "B",
       "header": "العميل",
       "kind": "input",
       "examples": [
        "متجر النيل للملابس",
        "متجر النيل للملابس",
        "عيادة الشروق للأسنان"
       ],
       "allowed_values": {
        "from_range": "'الإعدادات'!$A$14:$A$28"
       }
      },
      {
       "column": "C",
       "header": "المنصة",
       "kind": "input",
       "examples": [
        "Meta",
        "TikTok",
        "Meta"
       ],
       "allowed_values": [
        "Meta",
        "Google Ads",
        "TikTok",
        "Snapchat",
        "LinkedIn",
        "YouTube",
        "X"
       ]
      },
      {
       "column": "D",
       "header": "الإنفاق المُدار",
       "kind": "input",
       "examples": [
        42000,
        18000,
        25000
       ]
      },
      {
       "column": "E",
       "header": "الإيراد / النتيجة المسجلة",
       "kind": "input",
       "examples": [
        150000,
        49000,
        62000
       ]
      },
      {
       "column": "F",
       "header": "ساعات العمل",
       "kind": "input",
       "examples": [
        14,
        6,
        10
       ]
      },
      {
       "column": "G",
       "header": "الأتعاب",
       "kind": "formula",
       "formula_row_1": "=IF(M6=\"\",\"\",IF(M6=1,IFERROR(ROUND(MAX(INDEX('الإعدادات'!$D$14:$D$28,MATCH(B6,'الإعدادات'!$A$14:$A$28,0)),INDEX('الإعدادات'!$B$14:$B$28,MATCH(B6,'الإعدادات'!$A$14:$A$28,0))+INDEX('الإعدادات'!$C$14:$C$28,MATCH(B6,'الإعدادات'!$A$14:$A$28,0))*SUMIFS($D$6:$D$305,$B$6:$B$305,B6&\"\",$L$6:$L$305,L6&\"\")),2),0),0))"
      },
      {
       "column": "H",
       "header": "ROAS",
       "kind": "formula",
       "formula_row_1": "=IF(AND(ISNUMBER(D6),ISNUMBER(E6)),IF(D6>0,ROUND(E6/D6,2),\"\"),\"\")"
      },
      {
       "column": "I",
       "header": "التكلفة الداخلية",
       "kind": "formula",
       "formula_row_1": "=IF(ISNUMBER(F6),ROUND(F6*'الإعدادات'!$B$7,2),\"\")"
      },
      {
       "column": "J",
       "header": "الهامش (العميل في الشهر)",
       "kind": "formula",
       "formula_row_1": "=IF(M6=1,G6-SUMIFS($I$6:$I$305,$B$6:$B$305,B6&\"\",$L$6:$L$305,L6&\"\"),\"\")"
      },
      {
       "column": "K",
       "header": "نسبة الهامش",
       "kind": "formula",
       "formula_row_1": "=IF(M6=1,IF(G6>0,J6/G6,\"\"),\"\")"
      },
      {
       "column": "L",
       "header": "مفتاح الشهر",
       "kind": "formula",
       "formula_row_1": "=IF(ISNUMBER(A6),DATE(YEAR(A6),MONTH(A6),1),\"\")"
      },
      {
       "column": "M",
       "header": "أول صف",
       "kind": "formula",
       "formula_row_1": "=IF(AND(ISNUMBER(L6),B6&\"\"<>\"\"),IF(COUNTIFS($L$6:L6,L6&\"\",$B$6:B6,B6&\"\")=1,1,0),\"\")"
      },
      {
       "column": "N",
       "header": "تنبيه",
       "kind": "formula",
       "formula_row_1": "=IF(AND(A6=\"\",B6&\"\"=\"\",D6=\"\"),\"\",IF(NOT(ISNUMBER(A6)),\"التاريخ ناقص\",IF(NOT(ISNUMBER(D6)),\"الإنفاق ناقص\",IF(COUNTIF('الإعدادات'!$A$14:$A$28,B6&\"\")=0,\"عميل غير مسجل\",\"\"))))"
      }
     ]
    }
   ]
  },
  {
   "name": "التقرير",
   "formula_cells": 268,
   "record_tables": [
    {
     "header_row": 8,
     "first_record_row": 9,
     "sample_rows_filled": 0,
     "capacity_last_row": 52,
     "columns": [
      {
       "column": "A",
       "header": "العميل",
       "kind": "formula",
       "formula_row_1": "=IFERROR(INDEX($A$38:$A$52,MATCH(1,$M$38:$M$52,0)),\"\")"
      },
      {
       "column": "B",
       "header": "الإنفاق",
       "kind": "formula",
       "formula_row_1": "=IFERROR(INDEX($B$38:$B$52,MATCH(1,$M$38:$M$52,0)),\"\")"
      },
      {
       "column": "C",
       "header": "النتيجة (إيراد)",
       "kind": "formula",
       "formula_row_1": "=IFERROR(INDEX($C$38:$C$52,MATCH(1,$M$38:$M$52,0)),\"\")"
      },
      {
       "column": "D",
       "header": "ROAS",
       "kind": "formula",
       "formula_row_1": "=IFERROR(INDEX($E$38:$E$52,MATCH(1,$M$38:$M$52,0)),\"\")"
      },
      {
       "column": "E",
       "header": "الأتعاب",
       "kind": "formula",
       "formula_row_1": "=IFERROR(INDEX($F$38:$F$52,MATCH(1,$M$38:$M$52,0)),\"\")"
      },
      {
       "column": "F",
       "header": "الهامش",
       "kind": "formula",
       "formula_row_1": "=IFERROR(INDEX($H$38:$H$52,MATCH(1,$M$38:$M$52,0)),\"\")"
      },
      {
       "column": "G",
       "header": "نسبة الهامش",
       "kind": "formula",
       "formula_row_1": "=IFERROR(INDEX($I$38:$I$52,MATCH(1,$M$38:$M$52,0)),\"\")"
      },
      {
       "column": "H",
       "header": "ساعات",
       "kind": "formula",
       "formula_row_1": "=IFERROR(INDEX($D$38:$D$52,MATCH(1,$M$38:$M$52,0)),\"\")"
      },
      {
       "column": "I",
       "header": "الحالة",
       "kind": "formula",
       "formula_row_1": "=IFERROR(INDEX($J$38:$J$52,MATCH(1,$M$38:$M$52,0)),\"\")"
      }
     ]
    }
   ],
   "results": [
    {
     "label": "الوكالة",
     "cell": "B4",
     "formula": "='الإعدادات'!B4"
    },
    {
     "label": "الشهر",
     "cell": "B5",
     "formula": "='الإعدادات'!B6&\" / \"&'الإعدادات'!B5"
    }
   ]
  },
  {
   "name": "لماذا ما زلت على إكسل؟",
   "formula_cells": 0
  }
 ]
}