{
 "id": "vat-monthly",
 "file": "softwiro-vat-monthly.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": 193,
   "record_tables": [
    {
     "header_row": 5,
     "first_record_row": 6,
     "sample_rows_filled": 3,
     "capacity_last_row": 18,
     "columns": [
      {
       "column": "A",
       "header": "الشهر",
       "kind": "formula",
       "formula_row_1": "=INDEX('الإعدادات'!$E$5:$E$16,B6)&\" \"&YEAR(C6)"
      },
      {
       "column": "B",
       "header": "رقم الشهر",
       "kind": "formula",
       "formula_row_1": "=MONTH(C6)"
      },
      {
       "column": "C",
       "header": "بداية الشهر",
       "kind": "formula",
       "formula_row_1": "='الإعدادات'!$B$10"
      },
      {
       "column": "D",
       "header": "مبيعات خاضعة (صافي)",
       "kind": "formula",
       "formula_row_1": "=SUMIFS('المبيعات'!$E$5:$E$504,'المبيعات'!$D$5:$D$504,\"خاضعة\",'المبيعات'!$A$5:$A$504,\">=\"&$C6,'المبيعات'!$A$5:$A$504,\"<\"&DATE(YEAR($C6),MONTH($C6)+1,1))"
      },
      {
       "column": "E",
       "header": "مبيعات صفرية",
       "kind": "formula",
       "formula_row_1": "=SUMIFS('المبيعات'!$E$5:$E$504,'المبيعات'!$D$5:$D$504,\"صفرية\",'المبيعات'!$A$5:$A$504,\">=\"&$C6,'المبيعات'!$A$5:$A$504,\"<\"&DATE(YEAR($C6),MONTH($C6)+1,1))"
      },
      {
       "column": "F",
       "header": "مبيعات معفاة",
       "kind": "formula",
       "formula_row_1": "=SUMIFS('المبيعات'!$E$5:$E$504,'المبيعات'!$D$5:$D$504,\"معفاة\",'المبيعات'!$A$5:$A$504,\">=\"&$C6,'المبيعات'!$A$5:$A$504,\"<\"&DATE(YEAR($C6),MONTH($C6)+1,1))"
      },
      {
       "column": "G",
       "header": "ضريبة المخرجات",
       "kind": "formula",
       "formula_row_1": "=SUMIFS('المبيعات'!$F$5:$F$504,'المبيعات'!$A$5:$A$504,\">=\"&$C6,'المبيعات'!$A$5:$A$504,\"<\"&DATE(YEAR($C6),MONTH($C6)+1,1))"
      },
      {
       "column": "H",
       "header": "مشتريات (صافي)",
       "kind": "formula",
       "formula_row_1": "=SUMIFS('المشتريات'!$E$5:$E$504,'المشتريات'!$A$5:$A$504,\">=\"&$C6,'المشتريات'!$A$5:$A$504,\"<\"&DATE(YEAR($C6),MONTH($C6)+1,1))"
      },
      {
       "column": "I",
       "header": "ضريبة مدخلات قابلة للخصم",
       "kind": "formula",
       "formula_row_1": "=SUMIFS('المشتريات'!$G$5:$G$504,'المشتريات'!$A$5:$A$504,\">=\"&$C6,'المشتريات'!$A$5:$A$504,\"<\"&DATE(YEAR($C6),MONTH($C6)+1,1))"
      },
      {
       "column": "J",
       "header": "ضريبة غير قابلة للخصم",
       "kind": "formula",
       "formula_row_1": "=SUMIFS('المشتريات'!$F$5:$F$504,'المشتريات'!$A$5:$A$504,\">=\"&$C6,'المشتريات'!$A$5:$A$504,\"<\"&DATE(YEAR($C6),MONTH($C6)+1,1))-I6"
      },
      {
       "column": "K",
       "header": "صافي الشهر (مخرجات − مدخلات)",
       "kind": "formula",
       "formula_row_1": "=G6-I6"
      },
      {
       "column": "L",
       "header": "رصيد دائن مرحّل من قبل",
       "kind": "formula",
       "formula_row_1": "='الإعدادات'!$B$8"
      },
      {
       "column": "M",
       "header": "مستحق للسداد",
       "kind": "formula",
       "formula_row_1": "=MAX(0,K6-L6)"
      },
      {
       "column": "N",
       "header": "رصيد دائن للشهر التالي",
       "kind": "formula",
       "formula_row_1": "=MAX(0,L6-K6)"
      },
      {
       "column": "O",
       "header": "المسدّد",
       "kind": "input",
       "examples": [
        2275,
        3000,
        "=SUM(O6:O17)"
       ]
      },
      {
       "column": "P",
       "header": "المتبقي",
       "kind": "formula",
       "formula_row_1": "=M6-O6"
      }
     ]
    }
   ],
   "results": [
    {
     "label": "إجمالي المستحق للسداد في الفترة",
     "cell": "B3",
     "formula": "=M18"
    },
    {
     "label": "رصيد دائن في نهاية الفترة",
     "cell": "B4",
     "formula": "=N17"
    }
   ]
  },
  {
   "name": "إقرار الشهر",
   "formula_cells": 17,
   "settings": [
    {
     "label": "البند",
     "cell": "B6",
     "value": "القيمة"
    }
   ],
   "results": [
    {
     "label": "موضع الشهر في الملخص",
     "cell": "B4",
     "formula": "=IFERROR(MATCH('الإعدادات'!$B$9,'الملخص الشهري'!$B$6:$B$17,0),\"\")"
    },
    {
     "label": "الشهر",
     "cell": "B5",
     "formula": "=IF($B$4=\"\",\"اختر رقم شهر داخل الفترة في الإعدادات\",INDEX('الملخص الشهري'!$A$6:$A$17,$B$4))"
    },
    {
     "label": "مبيعات خاضعة (قبل الضريبة)",
     "cell": "B7",
     "formula": "=IF($B$4=\"\",\"\",INDEX('الملخص الشهري'!$D$6:$D$17,$B$4))"
    },
    {
     "label": "ضريبة المخرجات على المبيعات",
     "cell": "B8",
     "formula": "=IF($B$4=\"\",\"\",INDEX('الملخص الشهري'!$G$6:$G$17,$B$4))"
    },
    {
     "label": "مبيعات صفرية",
     "cell": "B9",
     "formula": "=IF($B$4=\"\",\"\",INDEX('الملخص الشهري'!$E$6:$E$17,$B$4))"
    },
    {
     "label": "مبيعات معفاة",
     "cell": "B10",
     "formula": "=IF($B$4=\"\",\"\",INDEX('الملخص الشهري'!$F$6:$F$17,$B$4))"
    },
    {
     "label": "إجمالي المبيعات قبل الضريبة",
     "cell": "B11",
     "formula": "=IF($B$4=\"\",\"\",B7+B9+B10)"
    },
    {
     "label": "مشتريات ومصروفات (قبل الضريبة)",
     "cell": "B12",
     "formula": "=IF($B$4=\"\",\"\",INDEX('الملخص الشهري'!$H$6:$H$17,$B$4))"
    },
    {
     "label": "ضريبة مدخلات قابلة للخصم",
     "cell": "B13",
     "formula": "=IF($B$4=\"\",\"\",INDEX('الملخص الشهري'!$I$6:$I$17,$B$4))"
    },
    {
     "label": "ضريبة مدخلات غير قابلة للخصم (لا تُخصم)",
     "cell": "B14",
     "formula": "=IF($B$4=\"\",\"\",INDEX('الملخص الشهري'!$J$6:$J$17,$B$4))"
    },
    {
     "label": "صافي الشهر: مخرجات − مدخلات",
     "cell": "B15",
     "formula": "=IF($B$4=\"\",\"\",INDEX('الملخص الشهري'!$K$6:$K$17,$B$4))"
    },
    {
     "label": "رصيد دائن مرحّل من الشهور السابقة",
     "cell": "B16",
     "formula": "=IF($B$4=\"\",\"\",INDEX('الملخص الشهري'!$L$6:$L$17,$B$4))"
    },
    {
     "label": "المستحق للسداد",
     "cell": "B17",
     "formula": "=IF($B$4=\"\",\"\",INDEX('الملخص الشهري'!$M$6:$M$17,$B$4))"
    },
    {
     "label": "رصيد دائن يُرحَّل للشهر التالي",
     "cell": "B18",
     "formula": "=IF($B$4=\"\",\"\",INDEX('الملخص الشهري'!$N$6:$N$17,$B$4))"
    },
    {
     "label": "المسدّد فعليًا",
     "cell": "B19",
     "formula": "=IF($B$4=\"\",\"\",B17-B20)"
    },
    {
     "label": "المتبقي",
     "cell": "B20",
     "formula": "=IF($B$4=\"\",\"\",INDEX('الملخص الشهري'!$P$6:$P$17,$B$4))"
    },
    {
     "label": "الحالة",
     "cell": "B21",
     "formula": "=IF($B$4=\"\",\"\",IF(B17>0,\"مستحق سداد\",IF(B18>0,\"رصيد دائن مرحّل\",\"متوازن\")))"
    }
   ]
  },
  {
   "name": "المبيعات",
   "formula_cells": 1500,
   "record_tables": [
    {
     "header_row": 4,
     "first_record_row": 5,
     "sample_rows_filled": 15,
     "capacity_last_row": 504,
     "columns": [
      {
       "column": "A",
       "header": "التاريخ",
       "kind": "input",
       "examples": [
        "2026-10-03",
        "2026-10-07",
        "2026-10-12"
       ]
      },
      {
       "column": "B",
       "header": "رقم الفاتورة",
       "kind": "input",
       "examples": [
        "S-101",
        "S-102",
        "S-103"
       ]
      },
      {
       "column": "C",
       "header": "العميل",
       "kind": "input",
       "examples": [
        "شركة الأمل للتجارة",
        "مطعم الواحة",
        "مكتب النور للمحاماة"
       ]
      },
      {
       "column": "D",
       "header": "نوع العملية",
       "kind": "input",
       "examples": [
        "خاضعة",
        "خاضعة",
        "خاضعة"
       ],
       "allowed_values": [
        "خاضعة",
        "صفرية",
        "معفاة"
       ]
      },
      {
       "column": "E",
       "header": "القيمة قبل الضريبة",
       "kind": "input",
       "examples": [
        25000,
        8400,
        12500
       ]
      },
      {
       "column": "F",
       "header": "الضريبة",
       "kind": "formula",
       "formula_row_1": "=IF(E5&\"\"=\"\",\"\",IF(D5=\"خاضعة\",ROUND(E5*'الإعدادات'!$B$7,2),0))"
      },
      {
       "column": "G",
       "header": "الإجمالي",
       "kind": "formula",
       "formula_row_1": "=IF(E5&\"\"=\"\",\"\",E5+F5)"
      },
      {
       "column": "H",
       "header": "تنبيه",
       "kind": "formula",
       "formula_row_1": "=IF(AND(A5&\"\"=\"\",E5&\"\"=\"\"),\"\",IF(OR(A5&\"\"=\"\",E5&\"\"=\"\",D5&\"\"=\"\"),\"بيانات ناقصة\",IF(OR(A5<'الإعدادات'!$B$10,A5>='الإعدادات'!$B$11),\"خارج فترة الحساب\",IF(AND(B5&\"\"<>\"\",COUNTIF($B$5:$B$504,B5&\"\")>1),\"رقم فاتورة مكرر\",\"\"))))"
      }
     ]
    }
   ]
  },
  {
   "name": "المشتريات",
   "formula_cells": 2000,
   "record_tables": [
    {
     "header_row": 4,
     "first_record_row": 5,
     "sample_rows_filled": 13,
     "capacity_last_row": 504,
     "columns": [
      {
       "column": "A",
       "header": "التاريخ",
       "kind": "input",
       "examples": [
        "2026-10-02",
        "2026-10-06",
        "2026-10-10"
       ]
      },
      {
       "column": "B",
       "header": "رقم الفاتورة",
       "kind": "input",
       "examples": [
        "P-501",
        "P-502",
        "P-503"
       ]
      },
      {
       "column": "C",
       "header": "المورد أو البيان",
       "kind": "input",
       "examples": [
        "مورد الخامات",
        "شركة الاتصالات",
        "مكتبة المستقبل"
       ]
      },
      {
       "column": "D",
       "header": "نوع العملية",
       "kind": "input",
       "examples": [
        "خاضعة",
        "خاضعة",
        "خاضعة"
       ],
       "allowed_values": [
        "خاضعة",
        "خاضعة غير قابلة للخصم",
        "معفاة"
       ]
      },
      {
       "column": "E",
       "header": "القيمة قبل الضريبة",
       "kind": "input",
       "examples": [
        16000,
        1800,
        2300
       ]
      },
      {
       "column": "F",
       "header": "الضريبة",
       "kind": "formula",
       "formula_row_1": "=IF(E5&\"\"=\"\",\"\",IF(OR(D5=\"خاضعة\",D5=\"خاضعة غير قابلة للخصم\"),ROUND(E5*'الإعدادات'!$B$7,2),0))"
      },
      {
       "column": "G",
       "header": "الضريبة القابلة للخصم",
       "kind": "formula",
       "formula_row_1": "=IF(E5&\"\"=\"\",\"\",IF(D5=\"خاضعة\",F5,0))"
      },
      {
       "column": "H",
       "header": "الإجمالي",
       "kind": "formula",
       "formula_row_1": "=IF(E5&\"\"=\"\",\"\",E5+F5)"
      },
      {
       "column": "I",
       "header": "تنبيه",
       "kind": "formula",
       "formula_row_1": "=IF(AND(A5&\"\"=\"\",E5&\"\"=\"\"),\"\",IF(OR(A5&\"\"=\"\",E5&\"\"=\"\",D5&\"\"=\"\"),\"بيانات ناقصة\",IF(OR(A5<'الإعدادات'!$B$10,A5>='الإعدادات'!$B$11),\"خارج فترة الحساب\",IF(AND(B5&\"\"<>\"\",COUNTIF($B$5:$B$504,B5&\"\")>1),\"رقم فاتورة مكرر\",\"\"))))"
      }
     ]
    }
   ]
  },
  {
   "name": "الإعدادات",
   "formula_cells": 2,
   "settings": [
    {
     "label": "اسم المنشأة",
     "cell": "B4",
     "value": "شركة النيل للتوريدات"
    },
    {
     "label": "سنة الشهر الأول للفترة",
     "cell": "B5",
     "value": 2026
    },
    {
     "label": "الشهر الأول للفترة (1 إلى 12)",
     "cell": "B6",
     "value": 10
    },
    {
     "label": "نسبة ضريبة القيمة المضافة",
     "cell": "B7",
     "value": 0.14
    },
    {
     "label": "رصيد دائن مرحّل في بداية الفترة",
     "cell": "B8",
     "value": 3500
    },
    {
     "label": "رقم الشهر المعروض في «إقرار الشهر»",
     "cell": "B9",
     "value": 11
    }
   ],
   "results": [
    {
     "label": "بداية الفترة",
     "cell": "B10",
     "formula": "=DATE(B5,B6,1)"
    },
    {
     "label": "نهاية الفترة (غير شاملة)",
     "cell": "B11",
     "formula": "=DATE(YEAR(B10),MONTH(B10)+12,1)"
    }
   ]
  },
  {
   "name": "لماذا ما زلت على إكسل؟",
   "formula_cells": 0
  }
 ]
}