{
  "docspoutTemplate": 1,
  "name": "Tax invoice (Arabic and English)",
  "description": "Sample bilingual invoice with AED amounts and 5% VAT.",
  "body": {
    "page": {
      "size": "A4",
      "orientation": "portrait",
      "marginMm": 16,
      "lang": "ar"
    },
    "theme": {
      "font": "Noto Sans",
      "baseSizePt": 10,
      "color": "#111827",
      "accent": "#0F766E"
    },
    "header": [],
    "footer": [
      {
        "kind": "columns",
        "id": "footer",
        "widths": [
          1,
          1
        ],
        "children": [
          [
            {
              "kind": "text",
              "id": "footer-l",
              "content": [
                {
                  "kind": "field",
                  "path": "sample_notice",
                  "format": null
                }
              ],
              "style": {
                "sizePt": 9,
                "bold": false,
                "italic": false,
                "align": "left",
                "color": "#6B7280"
              }
            }
          ],
          [
            {
              "kind": "text",
              "id": "footer-r",
              "content": [
                {
                  "kind": "text",
                  "text": "صفحة "
                },
                {
                  "kind": "pageNumber"
                },
                {
                  "kind": "text",
                  "text": " من "
                },
                {
                  "kind": "pageCount"
                },
                {
                  "kind": "text",
                  "text": " / Page "
                },
                {
                  "kind": "pageNumber"
                },
                {
                  "kind": "text",
                  "text": " of "
                },
                {
                  "kind": "pageCount"
                }
              ],
              "style": {
                "sizePt": 9,
                "bold": false,
                "italic": false,
                "align": "right",
                "color": "#6B7280"
              }
            }
          ]
        ]
      }
    ],
    "body": [
      {
        "kind": "columns",
        "id": "top",
        "widths": [
          1,
          1
        ],
        "children": [
          [
            {
              "kind": "text",
              "id": "title",
              "content": [
                {
                  "kind": "text",
                  "text": "فاتورة ضريبية"
                }
              ],
              "style": {
                "sizePt": 22,
                "bold": true,
                "italic": false,
                "align": "left",
                "color": "#0F766E"
              }
            },
            {
              "kind": "text",
              "id": "title-en",
              "content": [
                {
                  "kind": "text",
                  "text": "TAX INVOICE · PDF copy"
                }
              ],
              "style": {
                "sizePt": 9,
                "bold": false,
                "italic": false,
                "align": "left",
                "color": "#6B7280"
              }
            },
            {
              "kind": "text",
              "id": "number",
              "content": [
                {
                  "kind": "text",
                  "text": "رقم الفاتورة / Invoice no.: "
                },
                {
                  "kind": "field",
                  "path": "number",
                  "format": null
                }
              ],
              "style": {
                "sizePt": 9,
                "bold": false,
                "italic": false,
                "align": "left",
                "color": "#6B7280"
              }
            },
            {
              "kind": "text",
              "id": "issued",
              "content": [
                {
                  "kind": "text",
                  "text": "تاريخ الإصدار / Issued: "
                },
                {
                  "kind": "field",
                  "path": "issued",
                  "format": {
                    "kind": "date",
                    "style": "medium",
                    "locale": "en-US"
                  }
                }
              ],
              "style": {
                "sizePt": 9,
                "bold": false,
                "italic": false,
                "align": "left",
                "color": "#6B7280"
              }
            },
            {
              "kind": "text",
              "id": "due",
              "content": [
                {
                  "kind": "text",
                  "text": "تاريخ الاستحقاق / Due: "
                },
                {
                  "kind": "field",
                  "path": "due",
                  "format": {
                    "kind": "date",
                    "style": "medium",
                    "locale": "en-US"
                  }
                }
              ],
              "style": {
                "sizePt": 9,
                "bold": false,
                "italic": false,
                "align": "left",
                "color": "#6B7280"
              }
            }
          ],
          [
            {
              "kind": "text",
              "id": "company",
              "content": [
                {
                  "kind": "field",
                  "path": "company.name",
                  "format": null
                }
              ],
              "style": {
                "sizePt": 10,
                "bold": true,
                "italic": false,
                "align": "right",
                "color": null
              }
            },
            {
              "kind": "text",
              "id": "company-en",
              "content": [
                {
                  "kind": "field",
                  "path": "company.en",
                  "format": null
                }
              ],
              "style": {
                "sizePt": 9,
                "bold": false,
                "italic": false,
                "align": "right",
                "color": "#6B7280"
              }
            },
            {
              "kind": "text",
              "id": "company-address",
              "content": [
                {
                  "kind": "field",
                  "path": "company.address",
                  "format": null
                }
              ],
              "style": {
                "sizePt": 9,
                "bold": false,
                "italic": false,
                "align": "right",
                "color": "#6B7280"
              }
            },
            {
              "kind": "text",
              "id": "company-trn",
              "content": [
                {
                  "kind": "text",
                  "text": "الرقم الضريبي / TRN: "
                },
                {
                  "kind": "field",
                  "path": "company.trn",
                  "format": null
                }
              ],
              "style": {
                "sizePt": 9,
                "bold": false,
                "italic": false,
                "align": "right",
                "color": "#6B7280"
              }
            }
          ]
        ]
      },
      {
        "kind": "spacer",
        "id": "gap1",
        "heightMm": 6
      },
      {
        "kind": "text",
        "id": "bill-to",
        "content": [
          {
            "kind": "text",
            "text": "فاتورة إلى / Bill to"
          }
        ],
        "style": {
          "sizePt": 9,
          "bold": false,
          "italic": false,
          "align": "left",
          "color": "#6B7280"
        }
      },
      {
        "kind": "text",
        "id": "customer",
        "content": [
          {
            "kind": "field",
            "path": "customer.name",
            "format": null
          }
        ],
        "style": {
          "sizePt": 12,
          "bold": true,
          "italic": false,
          "align": "left",
          "color": null
        }
      },
      {
        "kind": "text",
        "id": "customer-en",
        "content": [
          {
            "kind": "field",
            "path": "customer.en",
            "format": null
          },
          {
            "kind": "text",
            "text": " · "
          },
          {
            "kind": "field",
            "path": "customer.address",
            "format": null
          }
        ],
        "style": {
          "sizePt": 9,
          "bold": false,
          "italic": false,
          "align": "left",
          "color": "#6B7280"
        }
      },
      {
        "kind": "text",
        "id": "customer-trn",
        "content": [
          {
            "kind": "text",
            "text": "الرقم الضريبي / TRN: "
          },
          {
            "kind": "field",
            "path": "customer.trn",
            "format": null
          }
        ],
        "style": {
          "sizePt": 9,
          "bold": false,
          "italic": false,
          "align": "left",
          "color": "#6B7280"
        }
      },
      {
        "kind": "spacer",
        "id": "gap2",
        "heightMm": 4
      },
      {
        "kind": "table",
        "id": "items",
        "rows": "items",
        "columns": [
          {
            "header": [
              {
                "kind": "text",
                "text": "#"
              }
            ],
            "cell": [
              {
                "kind": "field",
                "path": "no",
                "format": null
              }
            ],
            "width": "auto",
            "align": "left"
          },
          {
            "header": [
              {
                "kind": "text",
                "text": "الوصف"
              }
            ],
            "cell": [
              {
                "kind": "field",
                "path": "name",
                "format": null
              }
            ],
            "width": {
              "fr": 3
            },
            "align": "left"
          },
          {
            "header": [
              {
                "kind": "text",
                "text": "Description"
              }
            ],
            "cell": [
              {
                "kind": "field",
                "path": "en",
                "format": null
              }
            ],
            "width": {
              "fr": 3
            },
            "align": "left"
          },
          {
            "header": [
              {
                "kind": "text",
                "text": "الكمية / Qty"
              }
            ],
            "cell": [
              {
                "kind": "field",
                "path": "qty",
                "format": null
              }
            ],
            "width": "auto",
            "align": "right"
          },
          {
            "header": [
              {
                "kind": "text",
                "text": "سعر الوحدة / Unit price"
              }
            ],
            "cell": [
              {
                "kind": "field",
                "path": "price",
                "format": {
                  "kind": "currency",
                  "currency": "AED",
                  "locale": "en-US"
                }
              }
            ],
            "width": "auto",
            "align": "right"
          },
          {
            "header": [
              {
                "kind": "text",
                "text": "المبلغ / Amount"
              }
            ],
            "cell": [
              {
                "kind": "field",
                "path": "amount",
                "format": {
                  "kind": "currency",
                  "currency": "AED",
                  "locale": "en-US"
                }
              }
            ],
            "width": "auto",
            "align": "right"
          }
        ],
        "totals": null,
        "zebra": true
      },
      {
        "kind": "spacer",
        "id": "gap3",
        "heightMm": 3
      },
      {
        "kind": "text",
        "id": "subtotal",
        "content": [
          {
            "kind": "text",
            "text": "المجموع قبل الضريبة / Subtotal: "
          },
          {
            "kind": "field",
            "path": "subtotal",
            "format": {
              "kind": "currency",
              "currency": "AED",
              "locale": "en-US"
            }
          }
        ],
        "style": {
          "sizePt": 10,
          "bold": false,
          "italic": false,
          "align": "right",
          "color": null
        }
      },
      {
        "kind": "text",
        "id": "vat",
        "content": [
          {
            "kind": "text",
            "text": "ضريبة القيمة المضافة 5% / VAT 5%: "
          },
          {
            "kind": "field",
            "path": "vat",
            "format": {
              "kind": "currency",
              "currency": "AED",
              "locale": "en-US"
            }
          }
        ],
        "style": {
          "sizePt": 10,
          "bold": false,
          "italic": false,
          "align": "right",
          "color": null
        }
      },
      {
        "kind": "text",
        "id": "total",
        "content": [
          {
            "kind": "text",
            "text": "الإجمالي المستحق / Total due: "
          },
          {
            "kind": "field",
            "path": "total",
            "format": {
              "kind": "currency",
              "currency": "AED",
              "locale": "en-US"
            }
          }
        ],
        "style": {
          "sizePt": 12,
          "bold": true,
          "italic": false,
          "align": "right",
          "color": "#0F766E"
        }
      },
      {
        "kind": "text",
        "id": "words",
        "content": [
          {
            "kind": "text",
            "text": "المبلغ كتابةً / Amount in words: "
          },
          {
            "kind": "field",
            "path": "total",
            "format": {
              "kind": "words",
              "currency": "AED"
            }
          }
        ],
        "style": {
          "sizePt": 9,
          "bold": false,
          "italic": false,
          "align": "right",
          "color": "#6B7280"
        }
      }
    ],
    "sample": {
      "sample_notice": "SAMPLE · بيانات تجريبية",
      "number": "INV-2026-0412",
      "issued": "2026-12-04",
      "due": "2027-01-03",
      "company": {
        "name": "شركة الخليج للتجهيزات المكتبية",
        "en": "Gulf Office Fit-Out LLC (sample)",
        "address": "Business Bay, Dubai, UAE",
        "trn": "100000000000003"
      },
      "customer": {
        "name": "مؤسسة نجمة الصحراء للتجارة",
        "en": "Desert Star Trading Est. (sample)",
        "address": "Al Barsha, Dubai, UAE",
        "trn": "100000000000010"
      },
      "items": [
        {
          "no": 1,
          "name": "مكتب تنفيذي خشب الجوز",
          "en": "Executive desk, walnut",
          "qty": 4,
          "price": 3200,
          "amount": 12800
        },
        {
          "no": 2,
          "name": "كرسي مكتب مريح",
          "en": "Ergonomic office chair",
          "qty": 24,
          "price": 950,
          "amount": 22800
        },
        {
          "no": 3,
          "name": "طاولة اجتماعات 12 مقعداً",
          "en": "Meeting table, 12 seats",
          "qty": 2,
          "price": 7800,
          "amount": 15600
        },
        {
          "no": 4,
          "name": "كرسي اجتماعات",
          "en": "Meeting chair",
          "qty": 24,
          "price": 620,
          "amount": 14880
        },
        {
          "no": 5,
          "name": "خزانة ملفات معدنية",
          "en": "Metal filing cabinet",
          "qty": 10,
          "price": 840,
          "amount": 8400
        },
        {
          "no": 6,
          "name": "رف كتب مفتوح",
          "en": "Open bookshelf",
          "qty": 8,
          "price": 560,
          "amount": 4480
        },
        {
          "no": 7,
          "name": "أريكة استقبال ثلاثية",
          "en": "Reception sofa, three seats",
          "qty": 2,
          "price": 4300,
          "amount": 8600
        },
        {
          "no": 8,
          "name": "طاولة قهوة زجاجية",
          "en": "Glass coffee table",
          "qty": 2,
          "price": 1150,
          "amount": 2300
        },
        {
          "no": 9,
          "name": "مكتب استقبال مع إضاءة",
          "en": "Lit reception counter",
          "qty": 1,
          "price": 9600,
          "amount": 9600
        },
        {
          "no": 10,
          "name": "حاجز صوتي بين المكاتب",
          "en": "Acoustic desk divider",
          "qty": 20,
          "price": 380,
          "amount": 7600
        },
        {
          "no": 11,
          "name": "سجادة مكتبية رمادية بالمتر المربع",
          "en": "Grey office carpet, per m²",
          "qty": 180,
          "price": 95,
          "amount": 17100
        },
        {
          "no": 12,
          "name": "ستائر رول معتمة",
          "en": "Blackout roller blind",
          "qty": 16,
          "price": 420,
          "amount": 6720
        },
        {
          "no": 13,
          "name": "لوح إضاءة سقفي",
          "en": "LED ceiling panel",
          "qty": 60,
          "price": 210,
          "amount": 12600
        },
        {
          "no": 14,
          "name": "مصباح مكتب",
          "en": "Desk lamp",
          "qty": 24,
          "price": 145,
          "amount": 3480
        },
        {
          "no": 15,
          "name": "شاشة عرض 65 بوصة",
          "en": "Display screen, 65 inch",
          "qty": 3,
          "price": 5400,
          "amount": 16200
        },
        {
          "no": 16,
          "name": "حامل شاشة جداري",
          "en": "Wall screen mount",
          "qty": 3,
          "price": 480,
          "amount": 1440
        },
        {
          "no": 17,
          "name": "نظام مؤتمرات صوتي",
          "en": "Conference audio system",
          "qty": 2,
          "price": 6200,
          "amount": 12400
        },
        {
          "no": 18,
          "name": "كاميرا مؤتمرات",
          "en": "Conference camera",
          "qty": 2,
          "price": 2900,
          "amount": 5800
        },
        {
          "no": 19,
          "name": "نقطة وصول لاسلكية",
          "en": "Wireless access point",
          "qty": 6,
          "price": 1350,
          "amount": 8100
        },
        {
          "no": 20,
          "name": "مفتاح شبكة 48 منفذاً",
          "en": "Network switch, 48 port",
          "qty": 2,
          "price": 4100,
          "amount": 8200
        },
        {
          "no": 21,
          "name": "كابل شبكة بالمتر",
          "en": "Cat6 network cable, per metre",
          "qty": 900,
          "price": 6,
          "amount": 5400
        },
        {
          "no": 22,
          "name": "خزانة خوادم",
          "en": "Server rack",
          "qty": 1,
          "price": 3800,
          "amount": 3800
        },
        {
          "no": 23,
          "name": "وحدة تكييف إضافية",
          "en": "Supplementary AC unit",
          "qty": 4,
          "price": 5200,
          "amount": 20800
        },
        {
          "no": 24,
          "name": "مبرد مياه",
          "en": "Water dispenser",
          "qty": 3,
          "price": 890,
          "amount": 2670
        },
        {
          "no": 25,
          "name": "ثلاجة مطبخ",
          "en": "Pantry refrigerator",
          "qty": 1,
          "price": 3400,
          "amount": 3400
        },
        {
          "no": 26,
          "name": "آلة قهوة",
          "en": "Coffee machine",
          "qty": 1,
          "price": 4750,
          "amount": 4750
        },
        {
          "no": 27,
          "name": "خزائن مطبخ علوية",
          "en": "Pantry wall cabinets",
          "qty": 6,
          "price": 1250,
          "amount": 7500
        },
        {
          "no": 28,
          "name": "طاولة طعام للموظفين",
          "en": "Staff dining table",
          "qty": 2,
          "price": 2100,
          "amount": 4200
        },
        {
          "no": 29,
          "name": "كرسي طعام",
          "en": "Dining chair",
          "qty": 12,
          "price": 340,
          "amount": 4080
        },
        {
          "no": 30,
          "name": "لوح كتابة زجاجي",
          "en": "Glass whiteboard",
          "qty": 5,
          "price": 990,
          "amount": 4950
        },
        {
          "no": 31,
          "name": "نبات داخلي في أصيص",
          "en": "Potted indoor plant",
          "qty": 18,
          "price": 260,
          "amount": 4680
        },
        {
          "no": 32,
          "name": "خزانة أمتعة للموظفين",
          "en": "Staff locker unit",
          "qty": 4,
          "price": 2300,
          "amount": 9200
        },
        {
          "no": 33,
          "name": "قفل باب ذكي",
          "en": "Smart door lock",
          "qty": 6,
          "price": 1180,
          "amount": 7080
        },
        {
          "no": 34,
          "name": "قارئ بطاقات دخول",
          "en": "Access card reader",
          "qty": 4,
          "price": 1450,
          "amount": 5800
        },
        {
          "no": 35,
          "name": "كاميرا مراقبة داخلية",
          "en": "Indoor security camera",
          "qty": 8,
          "price": 720,
          "amount": 5760
        },
        {
          "no": 36,
          "name": "لافتة شعار الشركة",
          "en": "Company logo sign",
          "qty": 1,
          "price": 3600,
          "amount": 3600
        },
        {
          "no": 37,
          "name": "طلاء جدران بالمتر المربع",
          "en": "Wall painting, per m²",
          "qty": 420,
          "price": 28,
          "amount": 11760
        },
        {
          "no": 38,
          "name": "تركيب وتجميع الأثاث",
          "en": "Furniture assembly and installation",
          "qty": 1,
          "price": 7500,
          "amount": 7500
        },
        {
          "no": 39,
          "name": "نقل ورفع إلى الطابق 18",
          "en": "Delivery and lift to floor 18",
          "qty": 1,
          "price": 2800,
          "amount": 2800
        },
        {
          "no": 40,
          "name": "تنظيف بعد التركيب",
          "en": "Post-installation cleaning",
          "qty": 1,
          "price": 1900,
          "amount": 1900
        }
      ],
      "subtotal": 320730,
      "vat": 16036.5,
      "total": 336766.5
    }
  }
}
