{
 "id": "freelancer-projects-invoices",
 "file": "softwiro-freelancer-projects-invoices.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-01"
    },
    {
     "label": "السنة المعروضة في الدخل الشهري",
     "cell": "B5",
     "value": 2026
    }
   ]
  },
  {
   "name": "المشاريع",
   "formula_cells": 1400,
   "record_tables": [
    {
     "header_row": 5,
     "first_record_row": 6,
     "sample_rows_filled": 6,
     "capacity_last_row": 205,
     "columns": [
      {
       "column": "A",
       "header": "كود المشروع",
       "kind": "input",
       "examples": [
        "P01",
        "P02",
        "P03"
       ]
      },
      {
       "column": "B",
       "header": "اسم المشروع",
       "kind": "input",
       "examples": [
        "تصميم هوية بصرية",
        "موقع تعريفي",
        "إدارة حسابات التواصل"
       ]
      },
      {
       "column": "C",
       "header": "العميل",
       "kind": "input",
       "examples": [
        "متجر الورد",
        "مكتب المحاماة",
        "عيادة الأسنان"
       ]
      },
      {
       "column": "D",
       "header": "نوع التسعير",
       "kind": "input",
       "examples": [
        "سعر ثابت",
        "سعر ثابت",
        "بالساعة"
       ],
       "allowed_values": [
        "سعر ثابت",
        "بالساعة"
       ]
      },
      {
       "column": "E",
       "header": "السعر الثابت",
       "kind": "input",
       "examples": [
        12000,
        30000,
        8000
       ]
      },
      {
       "column": "F",
       "header": "سعر الساعة",
       "kind": "input",
       "examples": [
        200,
        150,
        180
       ]
      },
      {
       "column": "G",
       "header": "تاريخ البدء",
       "kind": "input",
       "examples": [
        "2026-08-01",
        "2026-09-01",
        "2026-09-15"
       ]
      },
      {
       "column": "H",
       "header": "الحالة",
       "kind": "input",
       "examples": [
        "مكتمل",
        "جارٍ",
        "جارٍ"
       ],
       "allowed_values": [
        "جارٍ",
        "مكتمل",
        "متوقف"
       ]
      },
      {
       "column": "I",
       "header": "الساعات المسجلة",
       "kind": "formula",
       "formula_row_1": "=IF(A6&\"\"=\"\",\"\",SUMIFS('الساعات'!$C$6:$C$2005,'الساعات'!$B$6:$B$2005,A6&\"\"))"
      },
      {
       "column": "J",
       "header": "قيمة المشروع",
       "kind": "formula",
       "formula_row_1": "=IF(A6&\"\"=\"\",\"\",IF(D6=\"بالساعة\",ROUND(I6*N(F6),2),N(E6)))"
      },
      {
       "column": "K",
       "header": "المفوتر",
       "kind": "formula",
       "formula_row_1": "=IF(A6&\"\"=\"\",\"\",SUMIFS('الفواتير'!$D$6:$D$1005,'الفواتير'!$C$6:$C$1005,A6&\"\"))"
      },
      {
       "column": "L",
       "header": "المحصّل",
       "kind": "formula",
       "formula_row_1": "=IF(A6&\"\"=\"\",\"\",SUMIFS('الفواتير'!$J$6:$J$1005,'الفواتير'!$C$6:$C$1005,A6&\"\"))"
      },
      {
       "column": "M",
       "header": "غير المفوتر",
       "kind": "formula",
       "formula_row_1": "=IF(A6&\"\"=\"\",\"\",ROUND(J6-K6,2))"
      },
      {
       "column": "N",
       "header": "المستحق على العميل",
       "kind": "formula",
       "formula_row_1": "=IF(A6&\"\"=\"\",\"\",ROUND(K6-L6,2))"
      },
      {
       "column": "O",
       "header": "تنبيه الفوترة",
       "kind": "formula",
       "formula_row_1": "=IF(A6&\"\"=\"\",\"\",IF(AND(H6=\"مكتمل\",M6>0),\"فوتر الباقي\",IF(AND(D6=\"بالساعة\",H6=\"جارٍ\",M6>0),\"ساعات لم تُفوتر\",\"\")))"
      }
     ]
    }
   ]
  },
  {
   "name": "الساعات",
   "formula_cells": 4000,
   "record_tables": [
    {
     "header_row": 5,
     "first_record_row": 6,
     "sample_rows_filled": 20,
     "capacity_last_row": 2005,
     "columns": [
      {
       "column": "A",
       "header": "التاريخ",
       "kind": "input",
       "examples": [
        "2026-08-05",
        "2026-08-20",
        "2026-09-02"
       ]
      },
      {
       "column": "B",
       "header": "كود المشروع",
       "kind": "input",
       "examples": [
        "P01",
        "P01",
        "P01"
       ],
       "allowed_values": {
        "from_range": "'المشاريع'!$A$6:$A$205"
       }
      },
      {
       "column": "C",
       "header": "الساعات",
       "kind": "input",
       "examples": [
        20,
        24,
        6
       ]
      },
      {
       "column": "D",
       "header": "الوصف",
       "kind": "input",
       "examples": [
        "شعار ومسودات",
        "دليل الهوية",
        "تسليم الملفات"
       ]
      },
      {
       "column": "E",
       "header": "المشروع",
       "kind": "formula",
       "formula_row_1": "=IF(B6&\"\"=\"\",\"\",IFERROR(INDEX('المشاريع'!$B$6:$B$205,MATCH(B6&\"\",'المشاريع'!$A$6:$A$205,0))&\"\",\"كود غير موجود\"))"
      },
      {
       "column": "F",
       "header": "قيمة الساعات (مشروع بالساعة)",
       "kind": "formula",
       "formula_row_1": "=IF(OR(B6&\"\"=\"\",NOT(ISNUMBER(C6))),\"\",IFERROR(IF(INDEX('المشاريع'!$D$6:$D$205,MATCH(B6&\"\",'المشاريع'!$A$6:$A$205,0))=\"بالساعة\",ROUND(C6*INDEX('المشاريع'!$F$6:$F$205,MATCH(B6&\"\",'المشاريع'!$A$6:$A$205,0)),2),0),0))"
      }
     ]
    }
   ]
  },
  {
   "name": "الفواتير",
   "formula_cells": 7000,
   "record_tables": [
    {
     "header_row": 5,
     "first_record_row": 6,
     "sample_rows_filled": 8,
     "capacity_last_row": 1005,
     "columns": [
      {
       "column": "A",
       "header": "رقم الفاتورة",
       "kind": "input",
       "examples": [
        "INV-001",
        "INV-002",
        "INV-003"
       ]
      },
      {
       "column": "B",
       "header": "تاريخ الفاتورة",
       "kind": "input",
       "examples": [
        "2026-08-31",
        "2026-09-10",
        "2026-09-15"
       ]
      },
      {
       "column": "C",
       "header": "كود المشروع",
       "kind": "input",
       "examples": [
        "P01",
        "P02",
        "P01"
       ],
       "allowed_values": {
        "from_range": "'المشاريع'!$A$6:$A$205"
       }
      },
      {
       "column": "D",
       "header": "المبلغ",
       "kind": "input",
       "examples": [
        7000,
        15000,
        5000
       ]
      },
      {
       "column": "E",
       "header": "أيام السداد",
       "kind": "input",
       "examples": [
        14,
        15,
        14
       ]
      },
      {
       "column": "F",
       "header": "ملاحظة",
       "kind": "input"
      },
      {
       "column": "G",
       "header": "المشروع",
       "kind": "formula",
       "formula_row_1": "=IF(C6&\"\"=\"\",\"\",IFERROR(INDEX('المشاريع'!$B$6:$B$205,MATCH(C6&\"\",'المشاريع'!$A$6:$A$205,0))&\"\",\"كود غير موجود\"))"
      },
      {
       "column": "H",
       "header": "العميل",
       "kind": "formula",
       "formula_row_1": "=IF(C6&\"\"=\"\",\"\",IFERROR(INDEX('المشاريع'!$C$6:$C$205,MATCH(C6&\"\",'المشاريع'!$A$6:$A$205,0))&\"\",\"كود غير موجود\"))"
      },
      {
       "column": "I",
       "header": "تاريخ الاستحقاق",
       "kind": "formula",
       "formula_row_1": "=IF(OR(A6&\"\"=\"\",NOT(ISNUMBER(B6)),NOT(ISNUMBER(E6))),\"\",B6+E6)"
      },
      {
       "column": "J",
       "header": "المدفوع",
       "kind": "formula",
       "formula_row_1": "=IF(A6&\"\"=\"\",\"\",SUMIFS('المدفوعات'!$C$6:$C$1005,'المدفوعات'!$B$6:$B$1005,A6&\"\"))"
      },
      {
       "column": "K",
       "header": "الرصيد",
       "kind": "formula",
       "formula_row_1": "=IF(OR(A6&\"\"=\"\",NOT(ISNUMBER(D6))),\"\",ROUND(D6-J6,2))"
      },
      {
       "column": "L",
       "header": "الحالة",
       "kind": "formula",
       "formula_row_1": "=IF(K6=\"\",\"\",IF(K6<=0,\"مسددة\",IF(AND(ISNUMBER(I6),I6<'الإعدادات'!$B$4),\"متأخرة\",IF(J6>0,\"مدفوعة جزئيًا\",\"مستحقة\"))))"
      },
      {
       "column": "M",
       "header": "أيام التأخير",
       "kind": "formula",
       "formula_row_1": "=IF(L6=\"متأخرة\",'الإعدادات'!$B$4-I6,\"\")"
      }
     ]
    }
   ]
  },
  {
   "name": "المدفوعات",
   "formula_cells": 2000,
   "record_tables": [
    {
     "header_row": 5,
     "first_record_row": 6,
     "sample_rows_filled": 5,
     "capacity_last_row": 1005,
     "columns": [
      {
       "column": "A",
       "header": "التاريخ",
       "kind": "input",
       "examples": [
        "2026-09-10",
        "2026-09-28",
        "2026-09-30"
       ]
      },
      {
       "column": "B",
       "header": "رقم الفاتورة",
       "kind": "input",
       "examples": [
        "INV-001",
        "INV-003",
        "INV-002"
       ],
       "allowed_values": {
        "from_range": "'الفواتير'!$A$6:$A$1005"
       }
      },
      {
       "column": "C",
       "header": "المبلغ",
       "kind": "input",
       "examples": [
        7000,
        5000,
        10000
       ]
      },
      {
       "column": "D",
       "header": "طريقة الدفع",
       "kind": "input",
       "examples": [
        "نقدًا",
        "تحويل بنكي",
        "محفظة إلكترونية"
       ],
       "allowed_values": [
        "نقدًا",
        "تحويل بنكي",
        "محفظة إلكترونية"
       ]
      },
      {
       "column": "E",
       "header": "ملاحظة",
       "kind": "input"
      },
      {
       "column": "F",
       "header": "المشروع",
       "kind": "formula",
       "formula_row_1": "=IF(B6&\"\"=\"\",\"\",IFERROR(INDEX('الفواتير'!$G$6:$G$1005,MATCH(B6&\"\",'الفواتير'!$A$6:$A$1005,0))&\"\",\"فاتورة غير موجودة\"))"
      },
      {
       "column": "G",
       "header": "العميل",
       "kind": "formula",
       "formula_row_1": "=IF(B6&\"\"=\"\",\"\",IFERROR(INDEX('الفواتير'!$H$6:$H$1005,MATCH(B6&\"\",'الفواتير'!$A$6:$A$1005,0))&\"\",\"فاتورة غير موجودة\"))"
      }
     ]
    }
   ]
  },
  {
   "name": "الملخص",
   "formula_cells": 72,
   "record_tables": [
    {
     "header_row": 33,
     "first_record_row": 34,
     "sample_rows_filled": 13,
     "capacity_last_row": 46,
     "columns": [
      {
       "column": "A",
       "header": "الشهر",
       "kind": "input",
       "examples": [
        1,
        2,
        3
       ]
      },
      {
       "column": "B",
       "header": "اسم الشهر",
       "kind": "input",
       "examples": [
        "يناير",
        "فبراير",
        "مارس"
       ]
      },
      {
       "column": "C",
       "header": "المفوتر",
       "kind": "formula",
       "formula_row_1": "=SUMIFS('الفواتير'!$D$6:$D$1005,'الفواتير'!$B$6:$B$1005,\">=\"&DATE('الإعدادات'!$B$5,A34,1),'الفواتير'!$B$6:$B$1005,\"<\"&DATE('الإعدادات'!$B$5,A34+1,1))"
      },
      {
       "column": "D",
       "header": "المحصّل",
       "kind": "formula",
       "formula_row_1": "=SUMIFS('المدفوعات'!$C$6:$C$1005,'المدفوعات'!$A$6:$A$1005,\">=\"&DATE('الإعدادات'!$B$5,A34,1),'المدفوعات'!$A$6:$A$1005,\"<\"&DATE('الإعدادات'!$B$5,A34+1,1))"
      },
      {
       "column": "E",
       "header": "الساعات",
       "kind": "formula",
       "formula_row_1": "=SUMIFS('الساعات'!$C$6:$C$2005,'الساعات'!$A$6:$A$2005,\">=\"&DATE('الإعدادات'!$B$5,A34,1),'الساعات'!$A$6:$A$2005,\"<\"&DATE('الإعدادات'!$B$5,A34+1,1))"
      },
      {
       "column": "F",
       "header": "قيمة ساعات المشاريع بالساعة",
       "kind": "formula",
       "formula_row_1": "=SUMIFS('الساعات'!$F$6:$F$2005,'الساعات'!$A$6:$A$2005,\">=\"&DATE('الإعدادات'!$B$5,A34,1),'الساعات'!$A$6:$A$2005,\"<\"&DATE('الإعدادات'!$B$5,A34+1,1))"
      }
     ]
    }
   ],
   "results": [
    {
     "label": "إجمالي المفوتر",
     "cell": "B5",
     "formula": "=SUM('الفواتير'!$D$6:$D$1005)"
    },
    {
     "label": "إجمالي المدفوعات المستلمة",
     "cell": "B6",
     "formula": "=SUM('المدفوعات'!$C$6:$C$1005)"
    },
    {
     "label": "المستحق على العملاء",
     "cell": "B7",
     "formula": "=SUMIF('الفواتير'!$K$6:$K$1005,\">0\")"
    },
    {
     "label": "منه متأخر",
     "cell": "B8",
     "formula": "=SUMIFS('الفواتير'!$K$6:$K$1005,'الفواتير'!$L$6:$L$1005,\"متأخرة\")"
    },
    {
     "label": "منه لم يحن موعده",
     "cell": "B9",
     "formula": "=B7-B8"
    },
    {
     "label": "عدد الفواتير المتأخرة",
     "cell": "B10",
     "formula": "=COUNTIF('الفواتير'!$L$6:$L$1005,\"متأخرة\")"
    },
    {
     "label": "أطول تأخير (يوم)",
     "cell": "B11",
     "formula": "=IF(B10=0,0,MAX('الفواتير'!$M$6:$M$1005))"
    },
    {
     "label": "عمل لم تفوتره بعد",
     "cell": "B12",
     "formula": "=SUMIF('المشاريع'!$M$6:$M$205,\">0\")"
    },
    {
     "label": "المفوتر هذا الشهر",
     "cell": "B15",
     "formula": "=SUMIFS('الفواتير'!$D$6:$D$1005,'الفواتير'!$B$6:$B$1005,\">=\"&DATE(YEAR('الإعدادات'!$B$4),MONTH('الإعدادات'!$B$4),1),'الفواتير'!$B$6:$B$1005,\"<=\"&'الإعدادات'!$B$4)"
    },
    {
     "label": "المحصّل هذا الشهر",
     "cell": "B16",
     "formula": "=SUMIFS('المدفوعات'!$C$6:$C$1005,'المدفوعات'!$A$6:$A$1005,\">=\"&DATE(YEAR('الإعدادات'!$B$4),MONTH('الإعدادات'!$B$4),1),'المدفوعات'!$A$6:$A$1005,\"<=\"&'الإعدادات'!$B$4)"
    },
    {
     "label": "ساعات هذا الشهر",
     "cell": "B17",
     "formula": "=SUMIFS('الساعات'!$C$6:$C$2005,'الساعات'!$A$6:$A$2005,\">=\"&DATE(YEAR('الإعدادات'!$B$4),MONTH('الإعدادات'!$B$4),1),'الساعات'!$A$6:$A$2005,\"<=\"&'الإعدادات'!$B$4)"
    },
    {
     "label": "قيمة ساعات هذا الشهر (مشاريع بالساعة)",
     "cell": "B18",
     "formula": "=SUMIFS('الساعات'!$F$6:$F$2005,'الساعات'!$A$6:$A$2005,\">=\"&DATE(YEAR('الإعدادات'!$B$4),MONTH('الإعدادات'!$B$4),1),'الساعات'!$A$6:$A$2005,\"<=\"&'الإعدادات'!$B$4)"
    },
    {
     "label": "عدد المشاريع",
     "cell": "B21",
     "formula": "=COUNTIF('المشاريع'!$A$6:$A$205,\"?*\")"
    },
    {
     "label": "جارية",
     "cell": "B22",
     "formula": "=COUNTIF('المشاريع'!$H$6:$H$205,\"جارٍ\")"
    },
    {
     "label": "مكتملة",
     "cell": "B23",
     "formula": "=COUNTIF('المشاريع'!$H$6:$H$205,\"مكتمل\")"
    },
    {
     "label": "متوقفة",
     "cell": "B24",
     "formula": "=COUNTIF('المشاريع'!$H$6:$H$205,\"متوقف\")"
    },
    {
     "label": "مشاريع تحتاج فوترة",
     "cell": "B25",
     "formula": "=COUNTIF('المشاريع'!$O$6:$O$205,\"فوتر الباقي\")+COUNTIF('المشاريع'!$O$6:$O$205,\"ساعات لم تُفوتر\")"
    },
    {
     "label": "السنة",
     "cell": "B28",
     "formula": "='الإعدادات'!$B$5"
    },
    {
     "label": "متوسط المحصّل في الشهور التي دخلها مال",
     "cell": "B29",
     "formula": "=IF(COUNTIF(D34:D45,\">0\")=0,\"\",SUM(D34:D45)/COUNTIF(D34:D45,\">0\"))"
    },
    {
     "label": "أعلى شهر تحصيلًا",
     "cell": "B30",
     "formula": "=IF(MAX(D34:D45)=0,\"\",MAX(D34:D45))"
    }
   ]
  },
  {
   "name": "لماذا ما زلت على إكسل؟",
   "formula_cells": 0
  }
 ]
}