{
 "id": "building-agent-accounts",
 "file": "softwiro-building-agent-accounts.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": 82,
   "record_tables": [
    {
     "header_row": 5,
     "first_record_row": 6,
     "sample_rows_filled": 10,
     "capacity_last_row": 45,
     "columns": [
      {
       "column": "A",
       "header": "كود الشقة (رقم)",
       "kind": "input",
       "examples": [
        1201,
        1202,
        1203
       ]
      },
      {
       "column": "B",
       "header": "وصف الشقة",
       "kind": "input",
       "examples": [
        "شقة 1 - الدور الأول",
        "شقة 2 - الدور الأول",
        "شقة 3 - الدور الثاني"
       ]
      },
      {
       "column": "C",
       "header": "اسم المستأجر",
       "kind": "input",
       "examples": [
        "أحمد سالم",
        "مها حسن",
        "خالد عمر"
       ]
      },
      {
       "column": "D",
       "header": "الإيجار الشهري",
       "kind": "input",
       "examples": [
        3000,
        3500,
        3000
       ]
      },
      {
       "column": "E",
       "header": "رصيد سابق مستحق عليها",
       "kind": "input",
       "examples": [
        3000
       ]
      },
      {
       "column": "F",
       "header": "اسم حساب الشقة",
       "kind": "formula",
       "formula_row_1": "=IF(A6&\"\"=\"\",\"\",IF(C6&\"\"=\"\",B6&\" - شاغرة\",B6&\" - \"&C6))"
      },
      {
       "column": "G",
       "header": "فحص",
       "kind": "formula",
       "formula_row_1": "=IF(A6&\"\"=\"\",\"\",IF(COUNTIF($A$6:$A$45,A6&\"\")>1,\"كود مكرر\",IF(COUNTIF('دليل الحسابات'!$A$6:$A$15,A6&\"\")>0,\"الكود مستخدم لحساب أساسي\",IF(AND(C6&\"\"<>\"\",D6&\"\"=\"\"),\"اكتب الإيجار\",\"\"))))"
      }
     ]
    }
   ],
   "results": [
    {
     "label": "عدد الشقق المؤجرة",
     "cell": "B4",
     "formula": "=COUNTIFS(C6:C45,\"?*\",D6:D45,\">0\")"
    }
   ]
  },
  {
   "name": "دليل الحسابات",
   "formula_cells": 173,
   "record_tables": [
    {
     "header_row": 5,
     "first_record_row": 6,
     "sample_rows_filled": 44,
     "capacity_last_row": 55,
     "columns": [
      {
       "column": "A",
       "header": "الكود",
       "kind": "input",
       "examples": [
        1101,
        4101,
        5101
       ]
      },
      {
       "column": "B",
       "header": "اسم الحساب",
       "kind": "input",
       "examples": [
        "الصندوق",
        "إيراد الإيجارات",
        "مصروفات العمارة"
       ]
      },
      {
       "column": "C",
       "header": "رصيد افتتاحي مدين",
       "kind": "input",
       "examples": [
        5000,
        "=IF(A16=\"\",\"\",IF('الشقق والمستأجرون'!E6&\"\"=\"\",\"\",'الشقق والمستأجرون'!E6))",
        "=IF(A17=\"\",\"\",IF('الشقق والمستأجرون'!E7&\"\"=\"\",\"\",'الشقق والمستأجرون'!E7))"
       ]
      },
      {
       "column": "D",
       "header": "رصيد افتتاحي دائن",
       "kind": "input",
       "examples": [
        8000
       ]
      },
      {
       "column": "E",
       "header": "فحص الحساب",
       "kind": "formula",
       "formula_row_1": "=IF(A6&\"\"=\"\",\"\",IF(COUNTIF($A$6:$A$55,A6&\"\")>1,\"كود مكرر\",IF(AND(C6&\"\"<>\"\",D6&\"\"<>\"\"),\"رصيد مدين ودائن معًا\",\"\")))"
      }
     ]
    }
   ]
  },
  {
   "name": "اليومية",
   "formula_cells": 10505,
   "record_tables": [
    {
     "header_row": 6,
     "first_record_row": 7,
     "sample_rows_filled": 29,
     "capacity_last_row": 1506,
     "columns": [
      {
       "column": "A",
       "header": "التاريخ",
       "kind": "input",
       "examples": [
        "2026-10-01",
        "2026-10-01",
        "2026-10-01"
       ]
      },
      {
       "column": "B",
       "header": "رقم القيد",
       "kind": "input",
       "examples": [
        1,
        1,
        1
       ]
      },
      {
       "column": "C",
       "header": "كود الحساب",
       "kind": "input",
       "examples": [
        1201,
        1202,
        1203
       ],
       "allowed_values": {
        "from_range": "'دليل الحسابات'!$A$6:$A$55"
       }
      },
      {
       "column": "D",
       "header": "البيان",
       "kind": "input",
       "examples": [
        "إيجار شهر 10/2026",
        "إيجار شهر 10/2026",
        "إيجار شهر 10/2026"
       ]
      },
      {
       "column": "E",
       "header": "مدين",
       "kind": "input",
       "examples": [
        3000,
        3500,
        3000
       ]
      },
      {
       "column": "F",
       "header": "دائن",
       "kind": "input",
       "examples": [
        33000,
        3000,
        3500
       ]
      },
      {
       "column": "G",
       "header": "اسم الحساب",
       "kind": "formula",
       "formula_row_1": "=IF(AND(C7&\"\"=\"\",E7&\"\"=\"\",F7&\"\"=\"\"),\"\",IF(C7&\"\"=\"\",\"كود ناقص\",IFERROR(INDEX('دليل الحسابات'!$B$6:$B$55,MATCH(C7,'دليل الحسابات'!$A$6:$A$55,0)),\"كود غير موجود\")))"
      },
      {
       "column": "H",
       "header": "فحص السطر",
       "kind": "formula",
       "formula_row_1": "=IF(AND(C7&\"\"=\"\",E7&\"\"=\"\",F7&\"\"=\"\"),\"\",IF(AND(E7&\"\"<>\"\",F7&\"\"<>\"\"),\"خطأ: مدين ودائن معًا\",IF(AND(E7&\"\"=\"\",F7&\"\"=\"\"),\"سطر بلا مبلغ\",\"\")))"
      },
      {
       "column": "I",
       "header": "فرق القيد (مدين − دائن)",
       "kind": "formula",
       "formula_row_1": "=IF(B7&\"\"=\"\",\"\",ROUND(SUMIFS($E$7:$E$1506,$B$7:$B$1506,B7&\"\")-SUMIFS($F$7:$F$1506,$B$7:$B$1506,B7&\"\"),2))"
      },
      {
       "column": "J",
       "header": "فحص القيد",
       "kind": "formula",
       "formula_row_1": "=IF(B7&\"\"=\"\",IF(AND(C7&\"\"=\"\",E7&\"\"=\"\",F7&\"\"=\"\"),\"\",\"رقم القيد ناقص\"),IF(I7=0,\"\",\"القيد غير متوازن\"))"
      },
      {
       "column": "K",
       "header": "ترتيب الحساب",
       "kind": "formula",
       "formula_row_1": "=IF(C7&\"\"=\"\",\"\",COUNTIF($C$7:C7,C7&\"\"))"
      },
      {
       "column": "L",
       "header": "مفتاح الأستاذ",
       "kind": "formula",
       "formula_row_1": "=IF(K7=\"\",\"\",C7&\"-\"&K7)"
      },
      {
       "column": "M",
       "header": "قيد غير متوازن",
       "kind": "formula",
       "formula_row_1": "=IF(J7<>\"القيد غير متوازن\",\"\",IF(COUNTIF($B$7:B7,B7&\"\")=1,1,\"\"))"
      }
     ]
    }
   ],
   "results": [
    {
     "label": "إجمالي المدين",
     "cell": "B4",
     "formula": "=SUM(E7:E1506)"
    },
    {
     "label": "الفرق (مدين − دائن)",
     "cell": "B5",
     "formula": "=ROUND(B4-D4,2)"
    }
   ]
  },
  {
   "name": "قيود الإيجار",
   "formula_cells": 207,
   "record_tables": [
    {
     "header_row": 7,
     "first_record_row": 8,
     "sample_rows_filled": 40,
     "capacity_last_row": 48,
     "columns": [
      {
       "column": "A",
       "header": "التاريخ",
       "kind": "formula",
       "formula_row_1": "=$B$4"
      },
      {
       "column": "B",
       "header": "رقم القيد",
       "kind": "formula",
       "formula_row_1": "=$D$4",
       "allowed_values": {
        "from_range": "'دليل الحسابات'!$A$6:$A$15"
       }
      },
      {
       "column": "C",
       "header": "كود الحساب",
       "kind": "formula",
       "formula_row_1": "=$B$5"
      },
      {
       "column": "D",
       "header": "البيان",
       "kind": "formula",
       "formula_row_1": "=\"إيجار شهر \"&MONTH($B$4)&\"/\"&YEAR($B$4)"
      },
      {
       "column": "E",
       "header": "مدين",
       "kind": "input",
       "examples": [
        "=IF(AND('الشقق والمستأجرون'!A6&\"\"<>\"\",'الشقق والمستأجرون'!C6&\"\"<>\"\",'الشقق والمستأجرون'!D6>0),'الشقق والمستأجرون'!D6,\"\")",
        "=IF(AND('الشقق والمستأجرون'!A7&\"\"<>\"\",'الشقق والمستأجرون'!C7&\"\"<>\"\",'الشقق والمستأجرون'!D7>0),'الشقق والمستأجرون'!D7,\"\")",
        "=IF(AND('الشقق والمستأجرون'!A8&\"\"<>\"\",'الشقق والمستأجرون'!C8&\"\"<>\"\",'الشقق والمستأجرون'!D8>0),'الشقق والمستأجرون'!D8,\"\")"
       ]
      },
      {
       "column": "F",
       "header": "دائن",
       "kind": "formula",
       "formula_row_1": "=IF(SUM(E9:E48)=0,\"\",SUM(E9:E48))"
      }
     ]
    }
   ],
   "settings": [
    {
     "label": "أول يوم في الشهر",
     "cell": "B4",
     "value": "2026-11-01"
    },
    {
     "label": "كود إيراد الإيجارات",
     "cell": "B5",
     "value": 4101
    }
   ]
  },
  {
   "name": "كشف حساب",
   "formula_cells": 1809,
   "record_tables": [
    {
     "header_row": 12,
     "first_record_row": 13,
     "sample_rows_filled": 0,
     "capacity_last_row": 212,
     "columns": [
      {
       "column": "A",
       "header": "م",
       "kind": "formula",
       "formula_row_1": "=IF($B$4&\"\"=\"\",\"\",IF(COUNTIF('اليومية'!$C$7:$C$1506,$B$4)>=1,1,\"\"))"
      },
      {
       "column": "B",
       "header": "التاريخ",
       "kind": "formula",
       "formula_row_1": "=IF(I13=\"\",\"\",IF(INDEX('اليومية'!$A$7:$A$1506,I13)&\"\"=\"\",\"\",INDEX('اليومية'!$A$7:$A$1506,I13)))",
       "allowed_values": {
        "from_range": "'دليل الحسابات'!$A$6:$A$55"
       }
      },
      {
       "column": "C",
       "header": "رقم القيد",
       "kind": "formula",
       "formula_row_1": "=IF(I13=\"\",\"\",INDEX('اليومية'!$B$7:$B$1506,I13))"
      },
      {
       "column": "D",
       "header": "البيان",
       "kind": "formula",
       "formula_row_1": "=IF(I13=\"\",\"\",IF(INDEX('اليومية'!$D$7:$D$1506,I13)&\"\"=\"\",\"\",INDEX('اليومية'!$D$7:$D$1506,I13)))"
      },
      {
       "column": "E",
       "header": "مدين",
       "kind": "formula",
       "formula_row_1": "=IF(I13=\"\",\"\",IF(INDEX('اليومية'!$E$7:$E$1506,I13)&\"\"=\"\",\"\",INDEX('اليومية'!$E$7:$E$1506,I13)))"
      },
      {
       "column": "F",
       "header": "دائن",
       "kind": "formula",
       "formula_row_1": "=IF(I13=\"\",\"\",IF(INDEX('اليومية'!$F$7:$F$1506,I13)&\"\"=\"\",\"\",INDEX('اليومية'!$F$7:$F$1506,I13)))"
      },
      {
       "column": "G",
       "header": "الرصيد",
       "kind": "formula",
       "formula_row_1": "=IF(A13=\"\",\"\",ABS(ROUND(($B$7+SUM(E$13:E13)-SUM(F$13:F13)),2)))"
      },
      {
       "column": "H",
       "header": "جانب الرصيد",
       "kind": "formula",
       "formula_row_1": "=IF(A13=\"\",\"\",IF(ROUND(($B$7+SUM(E$13:E13)-SUM(F$13:F13)),2)>0,\"مدين\",IF(ROUND(($B$7+SUM(E$13:E13)-SUM(F$13:F13)),2)<0,\"دائن\",\"\")))"
      },
      {
       "column": "I",
       "header": "سطر اليومية",
       "kind": "formula",
       "formula_row_1": "=IF(A13=\"\",\"\",MATCH($B$4&\"-\"&A13,'اليومية'!$L$7:$L$1506,0))"
      }
     ]
    }
   ],
   "settings": [
    {
     "label": "كود الحساب (الشقة أو غيرها)",
     "cell": "B4",
     "value": 1205
    }
   ],
   "results": [
    {
     "label": "اسم الحساب",
     "cell": "B5",
     "formula": "=IF($B$4&\"\"=\"\",\"\",IFERROR(INDEX('دليل الحسابات'!$B$6:$B$55,MATCH($B$4,'دليل الحسابات'!$A$6:$A$55,0)),\"كود غير موجود\"))"
    },
    {
     "label": "المستأجر",
     "cell": "B6",
     "formula": "=IF($B$4&\"\"=\"\",\"\",IFERROR(IF(INDEX('الشقق والمستأجرون'!$C$6:$C$45,MATCH($B$4,'الشقق والمستأجرون'!$A$6:$A$45,0))&\"\"=\"\",\"\",INDEX('الشقق والمستأجرون'!$C$6:$C$45,MATCH($B$4,'الشقق والمستأجرون'!$A$6:$A$45,0))),\"\"))"
    },
    {
     "label": "الرصيد الافتتاحي",
     "cell": "B7",
     "formula": "=IF($B$4&\"\"=\"\",\"\",SUMIFS('دليل الحسابات'!$C$6:$C$55,'دليل الحسابات'!$A$6:$A$55,$B$4)-SUMIFS('دليل الحسابات'!$D$6:$D$55,'دليل الحسابات'!$A$6:$A$55,$B$4))"
    },
    {
     "label": "مجموع المدين في الفترة",
     "cell": "B8",
     "formula": "=IF($B$4&\"\"=\"\",\"\",SUMIFS('اليومية'!$E$7:$E$1506,'اليومية'!$C$7:$C$1506,$B$4))"
    },
    {
     "label": "مجموع الدائن في الفترة",
     "cell": "B9",
     "formula": "=IF($B$4&\"\"=\"\",\"\",SUMIFS('اليومية'!$F$7:$F$1506,'اليومية'!$C$7:$C$1506,$B$4))"
    },
    {
     "label": "الرصيد الختامي",
     "cell": "B10",
     "formula": "=IF($B$4&\"\"=\"\",\"\",ROUND(B7+B8-B9,2))"
    }
   ]
  },
  {
   "name": "ميزان المراجعة",
   "formula_cells": 459,
   "record_tables": [
    {
     "header_row": 5,
     "first_record_row": 6,
     "sample_rows_filled": 0,
     "capacity_last_row": 55,
     "columns": [
      {
       "column": "A",
       "header": "الكود",
       "kind": "formula",
       "formula_row_1": "=IF('دليل الحسابات'!A6&\"\"=\"\",\"\",'دليل الحسابات'!A6)"
      },
      {
       "column": "B",
       "header": "اسم الحساب",
       "kind": "formula",
       "formula_row_1": "=IF(A6=\"\",\"\",'دليل الحسابات'!B6)"
      },
      {
       "column": "C",
       "header": "افتتاحي مدين",
       "kind": "formula",
       "formula_row_1": "=IF(A6=\"\",\"\",SUM('دليل الحسابات'!C6))"
      },
      {
       "column": "D",
       "header": "افتتاحي دائن",
       "kind": "formula",
       "formula_row_1": "=IF(A6=\"\",\"\",SUM('دليل الحسابات'!D6))"
      },
      {
       "column": "E",
       "header": "حركة مدين",
       "kind": "formula",
       "formula_row_1": "=IF(A6=\"\",\"\",SUMIFS('اليومية'!$E$7:$E$1506,'اليومية'!$C$7:$C$1506,A6&\"\"))"
      },
      {
       "column": "F",
       "header": "حركة دائن",
       "kind": "formula",
       "formula_row_1": "=IF(A6=\"\",\"\",SUMIFS('اليومية'!$F$7:$F$1506,'اليومية'!$C$7:$C$1506,A6&\"\"))"
      },
      {
       "column": "G",
       "header": "رصيد ختامي مدين",
       "kind": "formula",
       "formula_row_1": "=IF(A6=\"\",\"\",IF(ROUND(C6+E6-D6-F6,2)>0,ROUND(C6+E6-D6-F6,2),0))"
      },
      {
       "column": "H",
       "header": "رصيد ختامي دائن",
       "kind": "formula",
       "formula_row_1": "=IF(A6=\"\",\"\",IF(ROUND(C6+E6-D6-F6,2)<0,-ROUND(C6+E6-D6-F6,2),0))"
      },
      {
       "column": "I",
       "header": "الحالة",
       "kind": "formula",
       "formula_row_1": "=IF(A6=\"\",\"\",IF(ISNUMBER(MATCH(A6,'الشقق والمستأجرون'!$A$6:$A$45,0)),IF(G6>0,\"عليه رصيد مستحق\",IF(H6>0,\"دفع مقدمًا\",\"مسدد\")),\"\"))"
      }
     ]
    }
   ],
   "results": [
    {
     "label": "نتيجة الفحص",
     "cell": "B3",
     "formula": "=IF(ROUND(G4-H4,2)=0,\"الميزان متوازن\",\"الميزان غير متوازن\")"
    }
   ]
  },
  {
   "name": "لماذا ما زلت على إكسل؟",
   "formula_cells": 0
  }
 ]
}