{
 "id": "sales-team-targets",
 "file": "softwiro-sales-team-targets.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": 156,
   "record_tables": [
    {
     "header_row": 5,
     "first_record_row": 6,
     "sample_rows_filled": 0,
     "capacity_last_row": 32,
     "columns": [
      {
       "column": "D",
       "header": "المركز",
       "kind": "formula",
       "formula_row_1": "=IF(1<=COUNT('أداء الشهر'!$H$8:$H$19),1,\"\")"
      },
      {
       "column": "E",
       "header": "المندوب",
       "kind": "formula",
       "formula_row_1": "=IF($D6=\"\",\"\",INDEX('أداء الشهر'!$B$8:$B$19,MATCH($D6,'أداء الشهر'!$H$8:$H$19,0)))"
      },
      {
       "column": "F",
       "header": "الهدف",
       "kind": "formula",
       "formula_row_1": "=IF($D6=\"\",\"\",INDEX('أداء الشهر'!$D$8:$D$19,MATCH($D6,'أداء الشهر'!$H$8:$H$19,0)))"
      },
      {
       "column": "G",
       "header": "المبيعات",
       "kind": "formula",
       "formula_row_1": "=IF($D6=\"\",\"\",INDEX('أداء الشهر'!$E$8:$E$19,MATCH($D6,'أداء الشهر'!$H$8:$H$19,0)))"
      },
      {
       "column": "H",
       "header": "نسبة التحقيق",
       "kind": "formula",
       "formula_row_1": "=IF($D6=\"\",\"\",INDEX('أداء الشهر'!$F$8:$F$19,MATCH($D6,'أداء الشهر'!$H$8:$H$19,0)))"
      },
      {
       "column": "I",
       "header": "العمولة",
       "kind": "formula",
       "formula_row_1": "=IF($D6=\"\",\"\",INDEX('أداء الشهر'!$J$8:$J$19,MATCH($D6,'أداء الشهر'!$H$8:$H$19,0)))"
      }
     ]
    }
   ],
   "results": [
    {
     "label": "شهر التقرير",
     "cell": "B3",
     "formula": "='الإعدادات'!B13"
    }
   ]
  },
  {
   "name": "أداء الشهر",
   "formula_cells": 189,
   "record_tables": [
    {
     "header_row": 7,
     "first_record_row": 8,
     "sample_rows_filled": 0,
     "capacity_last_row": 20,
     "columns": [
      {
       "column": "A",
       "header": "الكود",
       "kind": "formula",
       "formula_row_1": "=IF('الأهداف'!A6&\"\"=\"\",\"\",'الأهداف'!A6&\"\")"
      },
      {
       "column": "B",
       "header": "المندوب",
       "kind": "formula",
       "formula_row_1": "=IF($A8=\"\",\"\",'الأهداف'!B6&\"\")"
      },
      {
       "column": "C",
       "header": "الفريق",
       "kind": "formula",
       "formula_row_1": "=IF($A8=\"\",\"\",'الأهداف'!C6&\"\")"
      },
      {
       "column": "D",
       "header": "الهدف",
       "kind": "formula",
       "formula_row_1": "=IF($A8=\"\",\"\",N(INDEX('الأهداف'!$D6:$O6,'الإعدادات'!$B$6)))"
      },
      {
       "column": "E",
       "header": "صافي المبيعات",
       "kind": "formula",
       "formula_row_1": "=IF($A8=\"\",\"\",SUMIFS('سجل المبيعات'!$I$5:$I$1004,'سجل المبيعات'!$C$5:$C$1004,$A8,'سجل المبيعات'!$A$5:$A$1004,\">=\"&'الإعدادات'!$B$9,'سجل المبيعات'!$A$5:$A$1004,\"<\"&'الإعدادات'!$B$10))"
      },
      {
       "column": "F",
       "header": "نسبة التحقيق",
       "kind": "formula",
       "formula_row_1": "=IF($A8=\"\",\"\",IF(D8>0,ROUND(E8/D8,4),\"\"))"
      },
      {
       "column": "G",
       "header": "المتبقي للهدف",
       "kind": "formula",
       "formula_row_1": "=IF($A8=\"\",\"\",IF(F8=\"\",\"\",MAX(0,D8-E8)))"
      },
      {
       "column": "H",
       "header": "الترتيب",
       "kind": "formula",
       "formula_row_1": "=IF($A8=\"\",\"\",IF(F8=\"\",\"\",COUNTIF($F$8:$F$19,\">\"&F8)+COUNTIF($F$8:F8,F8)))"
      },
      {
       "column": "I",
       "header": "نسبة العمولة",
       "kind": "formula",
       "formula_row_1": "=IF($A8=\"\",\"\",IF(F8=\"\",\"\",INDEX('الإعدادات'!$B$17:$B$21,MATCH(F8,'الإعدادات'!$A$17:$A$21,1))))"
      },
      {
       "column": "J",
       "header": "العمولة",
       "kind": "formula",
       "formula_row_1": "=IF($A8=\"\",\"\",IF(F8=\"\",\"\",ROUND(MAX(E8,0)*I8,2)))"
      },
      {
       "column": "K",
       "header": "عدد الفواتير",
       "kind": "formula",
       "formula_row_1": "=IF($A8=\"\",\"\",COUNTIFS('سجل المبيعات'!$C$5:$C$1004,$A8,'سجل المبيعات'!$G$5:$G$1004,\"بيع\",'سجل المبيعات'!$A$5:$A$1004,\">=\"&'الإعدادات'!$B$9,'سجل المبيعات'!$A$5:$A$1004,\"<\"&'الإعدادات'!$B$10))"
      },
      {
       "column": "L",
       "header": "متوسط الفاتورة",
       "kind": "formula",
       "formula_row_1": "=IF($A8=\"\",\"\",IF(K8=0,\"\",ROUND(SUMIFS('سجل المبيعات'!$H$5:$H$1004,'سجل المبيعات'!$C$5:$C$1004,$A8,'سجل المبيعات'!$G$5:$G$1004,\"بيع\",'سجل المبيعات'!$A$5:$A$1004,\">=\"&'الإعدادات'!$B$9,'سجل المبيعات'!$A$5:$A$1004,\"<\"&'الإعدادات'!$B$10)/K8,2)))"
      },
      {
       "column": "M",
       "header": "الحالة",
       "kind": "formula",
       "formula_row_1": "=IF($A8=\"\",\"\",IF(F8=\"\",\"\",IF(F8>=1,\"حقق الهدف\",IF(F8>='الإعدادات'!$B$7,\"قريب\",\"متأخر\"))))"
      },
      {
       "column": "N",
       "header": "الوتيرة",
       "kind": "formula",
       "formula_row_1": "=IF($A8=\"\",\"\",IF(F8=\"\",\"\",IF(F8>='الإعدادات'!$B$12,\"على المسار\",\"خلف المسار\")))"
      },
      {
       "column": "O",
       "header": "المتوقع بنهاية الشهر",
       "kind": "formula",
       "formula_row_1": "=IF($A8=\"\",\"\",IF('الإعدادات'!$B$12>0,ROUND(E8/'الإعدادات'!$B$12,2),\"\"))"
      }
     ]
    }
   ],
   "results": [
    {
     "label": "الشهر",
     "cell": "B4",
     "formula": "='الإعدادات'!B13"
    },
    {
     "label": "نسبة الوقت المنقضي",
     "cell": "B5",
     "formula": "='الإعدادات'!$B$12+0"
    }
   ]
  },
  {
   "name": "سجل المبيعات",
   "formula_cells": 3000,
   "record_tables": [
    {
     "header_row": 4,
     "first_record_row": 5,
     "sample_rows_filled": 128,
     "capacity_last_row": 1004,
     "columns": [
      {
       "column": "A",
       "header": "التاريخ",
       "kind": "input",
       "examples": [
        "2026-10-01",
        "2026-10-01",
        "2026-10-03"
       ]
      },
      {
       "column": "B",
       "header": "رقم الفاتورة",
       "kind": "input",
       "examples": [
        "INV-2001",
        "INV-2002",
        "INV-2003"
       ]
      },
      {
       "column": "C",
       "header": "كود المندوب",
       "kind": "input",
       "examples": [
        "R04",
        "R07",
        "R03"
       ],
       "allowed_values": {
        "from_range": "'الأهداف'!$A$6:$A$17"
       }
      },
      {
       "column": "D",
       "header": "المندوب",
       "kind": "formula",
       "formula_row_1": "=IF(C5&\"\"=\"\",\"\",IFERROR(INDEX('الأهداف'!$B$6:$B$17,MATCH(C5&\"\",'الأهداف'!$A$6:$A$17,0)),\"غير معروف\"))"
      },
      {
       "column": "E",
       "header": "العميل",
       "kind": "input",
       "examples": [
        "مكتبة الأمل",
        "سنتر الشروق",
        "فندق النيل"
       ]
      },
      {
       "column": "F",
       "header": "خط المنتج",
       "kind": "input",
       "examples": [
        "أدوات منزلية",
        "عناية شخصية",
        "مواد غذائية"
       ],
       "allowed_values": {
        "from_range": "'الإعدادات'!$A$24:$A$31"
       }
      },
      {
       "column": "G",
       "header": "النوع",
       "kind": "input",
       "examples": [
        "بيع",
        "بيع",
        "بيع"
       ],
       "allowed_values": [
        "بيع",
        "مرتجع"
       ]
      },
      {
       "column": "H",
       "header": "المبلغ",
       "kind": "input",
       "examples": [
        8450,
        7950,
        9600
       ]
      },
      {
       "column": "I",
       "header": "الصافي",
       "kind": "formula",
       "formula_row_1": "=IF(H5&\"\"=\"\",\"\",IF(G5=\"مرتجع\",-H5,H5))"
      },
      {
       "column": "J",
       "header": "تنبيه",
       "kind": "formula",
       "formula_row_1": "=IF(AND(C5&\"\"=\"\",H5&\"\"=\"\"),\"\",IF(C5&\"\"=\"\",\"كود المندوب ناقص\",IF(COUNTIF('الأهداف'!$A$6:$A$17,C5&\"\")=0,\"مندوب غير معروف\",IF(NOT(ISNUMBER(A5)),\"تاريخ ناقص\",IF(OR(A5<DATE('الإعدادات'!$B$5,1,1),A5>=DATE('الإعدادات'!$B$5+1,1,1)),\"خارج سنة الأهداف\",IF(G5&\"\"=\"\",\"النوع ناقص\",\"\"))))))"
      }
     ]
    }
   ]
  },
  {
   "name": "الأهداف",
   "formula_cells": 13,
   "record_tables": [
    {
     "header_row": 5,
     "first_record_row": 6,
     "sample_rows_filled": 8,
     "capacity_last_row": 17,
     "columns": [
      {
       "column": "A",
       "header": "الكود",
       "kind": "input",
       "examples": [
        "R01",
        "R02",
        "R03"
       ]
      },
      {
       "column": "B",
       "header": "المندوب",
       "kind": "input",
       "examples": [
        "أحمد سمير",
        "منى عادل",
        "كريم فؤاد"
       ]
      },
      {
       "column": "C",
       "header": "الفريق / الفرع",
       "kind": "input",
       "examples": [
        "القاهرة",
        "القاهرة",
        "الإسكندرية"
       ]
      },
      {
       "column": "D",
       "header": "يناير",
       "kind": "input"
      },
      {
       "column": "E",
       "header": "فبراير",
       "kind": "input"
      },
      {
       "column": "F",
       "header": "مارس",
       "kind": "input"
      },
      {
       "column": "G",
       "header": "أبريل",
       "kind": "input"
      },
      {
       "column": "H",
       "header": "مايو",
       "kind": "input"
      },
      {
       "column": "I",
       "header": "يونيو",
       "kind": "input"
      },
      {
       "column": "J",
       "header": "يوليو",
       "kind": "input"
      },
      {
       "column": "K",
       "header": "أغسطس",
       "kind": "input"
      },
      {
       "column": "L",
       "header": "سبتمبر",
       "kind": "input"
      },
      {
       "column": "M",
       "header": "أكتوبر",
       "kind": "input",
       "examples": [
        90000,
        85000,
        80000
       ]
      },
      {
       "column": "N",
       "header": "نوفمبر",
       "kind": "input",
       "examples": [
        95000,
        90000,
        80000
       ]
      },
      {
       "column": "O",
       "header": "ديسمبر",
       "kind": "input"
      },
      {
       "column": "P",
       "header": "إجمالي السنة",
       "kind": "formula",
       "formula_row_1": "=IF(A6&\"\"=\"\",\"\",SUM(D6:O6))"
      }
     ]
    }
   ],
   "results": [
    {
     "label": "سنة الأهداف",
     "cell": "B3",
     "formula": "='الإعدادات'!$B$5"
    }
   ]
  },
  {
   "name": "الاتجاه الشهري",
   "formula_cells": 280,
   "record_tables": [
    {
     "header_row": 5,
     "first_record_row": 6,
     "sample_rows_filled": 28,
     "capacity_last_row": 34,
     "columns": [
      {
       "column": "A",
       "header": "الشهر",
       "kind": "input",
       "examples": [
        "يناير",
        "فبراير",
        "مارس"
       ]
      },
      {
       "column": "B",
       "header": "هدف الفريق",
       "kind": "formula",
       "formula_row_1": "=SUM('الأهداف'!D6:D17)"
      },
      {
       "column": "C",
       "header": "مبيعات الفريق",
       "kind": "formula",
       "formula_row_1": "=C34"
      },
      {
       "column": "D",
       "header": "نسبة التحقيق",
       "kind": "formula",
       "formula_row_1": "=IF(B6>0,ROUND(C6/B6,4),\"\")"
      },
      {
       "column": "E",
       "header": "الفرق عن الهدف (موجب = لم يتحقق)",
       "kind": "formula",
       "formula_row_1": "=IF(B6>0,B6-C6,\"\")"
      },
      {
       "column": "F",
       "header": "مبيعات تراكمية",
       "kind": "formula",
       "formula_row_1": "=SUM(C$6:C6)"
      },
      {
       "column": "G",
       "header": "هدف تراكمي",
       "kind": "formula",
       "formula_row_1": "=SUM(B$6:B6)"
      },
      {
       "column": "H",
       "header": "نسبة التراكمي",
       "kind": "formula",
       "formula_row_1": "=IF(G6>0,ROUND(F6/G6,4),\"\")"
      }
     ]
    }
   ]
  },
  {
   "name": "الإعدادات",
   "formula_cells": 5,
   "record_tables": [
    {
     "header_row": 16,
     "first_record_row": 17,
     "sample_rows_filled": 13,
     "capacity_last_row": 29,
     "columns": [
      {
       "column": "A",
       "header": "من نسبة تحقيق الهدف",
       "kind": "input",
       "examples": [
        0,
        0.7,
        0.9
       ]
      },
      {
       "column": "B",
       "header": "نسبة العمولة من صافي المبيعات",
       "kind": "input",
       "examples": [
        0,
        0.005,
        0.01
       ],
       "allowed_values": [
        "1",
        "2",
        "3",
        "4",
        "5",
        "6",
        "7",
        "8",
        "9",
        "10",
        "11",
        "12"
       ]
      },
      {
       "column": "C",
       "header": "وصف الشريحة",
       "kind": "input",
       "examples": [
        "دون 70%",
        "70% إلى أقل من 90%",
        "90% إلى أقل من 100%"
       ]
      }
     ]
    }
   ],
   "settings": [
    {
     "label": "تاريخ اليوم",
     "cell": "B4",
     "value": "2026-11-26"
    },
    {
     "label": "سنة الأهداف",
     "cell": "B5",
     "value": 2026
    },
    {
     "label": "شهر التقرير (1 إلى 12)",
     "cell": "B6",
     "value": 11
    },
    {
     "label": "حد «قريب من الهدف» (نسبة التحقيق)",
     "cell": "B7",
     "value": 0.85
    }
   ],
   "results": [
    {
     "label": "بداية شهر التقرير",
     "cell": "B9",
     "formula": "=DATE(B5,B6,1)"
    },
    {
     "label": "بداية الشهر التالي",
     "cell": "B10",
     "formula": "=IF(B6=12,DATE(B5+1,1,1),DATE(B5,B6+1,1))"
    },
    {
     "label": "عدد أيام الشهر",
     "cell": "B11",
     "formula": "=B10-B9"
    },
    {
     "label": "نسبة الوقت المنقضي من الشهر",
     "cell": "B12",
     "formula": "=MIN(1,MAX(0,(B4-B9+1)/B11))"
    },
    {
     "label": "الشهر المعروض",
     "cell": "B13",
     "formula": "=CHOOSE(B6,\"يناير\",\"فبراير\",\"مارس\",\"أبريل\",\"مايو\",\"يونيو\",\"يوليو\",\"أغسطس\",\"سبتمبر\",\"أكتوبر\",\"نوفمبر\",\"ديسمبر\")&\" \"&B5"
    }
   ]
  },
  {
   "name": "لماذا ما زلت على إكسل؟",
   "formula_cells": 0
  }
 ]
}