{
  "format": "jmeryar-print-template",
  "version": 1,
  "id": "minimal-ku",
  "doc_type": "sell_invoice",
  "locale": "ku",
  "name": {
    "en": "Minimal invoice",
    "ku": "پسوڵەی سادە",
    "ar": "فاتورة بسيطة",
    "fa": "فاکتور ساده",
    "de": "Rechnung „Minimal“"
  },
  "description": {
    "en": "A4 sell invoice in black on white with no filled areas — thin rules and generous spacing. Prints cleanly and cheaply on any office printer.",
    "ku": "پسوڵەی فرۆشتنی A4 بە ڕەش لەسەر سپی، بێ ناوچەی پڕکراوە — هێڵی باریک و بۆشایی زۆر. لەسەر هەر پرینتەرێکی ئۆفیس بە پاکی و هەرزانی چاپ دەکرێت.",
    "ar": "فاتورة بيع بحجم A4 بالأسود على الأبيض دون مساحات مملوءة — خطوط رفيعة ومسافات واسعة. تُطبع بوضوح وبتكلفة قليلة على أي طابعة مكتبية.",
    "fa": "فاکتور فروش A4 سیاه روی سفید و بدون سطح پرشده — خطوط نازک و فاصله‌های باز. روی هر چاپگر اداری تمیز و کم‌هزینه چاپ می‌شود.",
    "de": "A4-Verkaufsrechnung schwarz auf weiß ohne Farbflächen — feine Linien, viel Weißraum. Druckt sauber und sparsam auf jedem Bürodrucker."
  },
  "content": "{%- comment -%}\n  Sell invoice — MINIMAL (کوردی). From the jmeryar template library.\n  A4, black on white, no filled areas at all: structure comes from type and thin\n  rules, so it prints cleanly on any office laser printer. Every figure arrives\n  already written the way this install writes numbers and dates; .ltr keeps a\n  figure in one piece inside right-to-left text.\n{%- endcomment -%}\n{%- assign org_name = branch.invoice_title | default: branch.company_name | default: branch.name | default: invoice.branch_name -%}\n{%- case digits -%}{%- when \"persian\" -%}{%- assign page_digits = \"persian\" -%}{%- when \"arabic\" -%}{%- assign page_digits = \"arabic-indic\" -%}{%- else -%}{%- assign page_digits = \"decimal\" -%}{%- endcase -%}\n<!doctype html>\n<html lang=\"ku\" dir=\"rtl\">\n<head>\n<meta charset=\"utf-8\">\n<title>پسوڵەی فرۆشتن {{ invoice.number }}</title>\n<style>\n  :root { --ink:#111; --muted:#6b7280; --line:#d1d5db; }\n  * { box-sizing: border-box; }\n  html, body { margin: 0; padding: 0; }\n  body { font-family: Tahoma, \"Segoe UI\", \"Noto Naskh Arabic\", \"Noto Sans Arabic\", Arial, sans-serif; color: var(--ink); font-size: 11.5px; line-height: 1.6; background: #f3f4f6; }\n  .sheet { width: 210mm; min-height: 297mm; margin: 12px auto; padding: 20mm 18mm; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.12); }\n  .ltr { direction: ltr; unicode-bidi: isolate; font-variant-numeric: tabular-nums; }\n  .muted { color: var(--muted); }\n  @page {\n    size: A4; margin: 20mm 18mm;\n    @bottom-center { content: counter(page, {{ page_digits }}) \" / \" counter(pages, {{ page_digits }}); font: 8.5px Tahoma, \"Segoe UI\", \"Noto Naskh Arabic\", \"Noto Sans Arabic\", Arial, sans-serif; color: #9ca3af; }\n  }\n\n  .top { display: flex; justify-content: space-between; align-items: flex-start; gap: 32px; }\n  .logo { display: block; max-height: 44px; max-width: 120px; object-fit: contain; margin-bottom: 8px; }\n  .org-name { font-family: \"Noto Naskh Arabic\", \"Times New Roman\", serif; font-size: 22px; letter-spacing: .2px; }\n  .org-meta { margin-top: 4px; font-size: 10px; color: var(--muted); }\n  .kind { font-family: \"Noto Naskh Arabic\", \"Times New Roman\", serif; font-size: 34px; line-height: 1; text-align: end; }\n  .no { margin-top: 6px; text-align: end; font-size: 12px; }\n  .state { margin-top: 4px; text-align: end; font-size: 10px; font-weight: 700; letter-spacing: 1px; }\n\n  .meta { display: flex; justify-content: space-between; gap: 32px; margin: 18mm 0 10mm; }\n  .meta .col { min-width: 0; }\n  .label { font-size: 9px; letter-spacing: 1.2px; text-transform: uppercase; color: var(--muted); margin-bottom: 4px; }\n  .who { font-size: 14px; font-weight: 600; }\n  .facts { border-collapse: collapse; }\n  .facts td { padding: 1px 0; }\n  .facts td.k { color: var(--muted); padding-inline-end: 18px; }\n  .facts td.v { text-align: end; }\n\n  table.lines { width: 100%; border-collapse: collapse; }\n  table.lines thead { display: table-header-group; }\n  table.lines tr { break-inside: avoid; page-break-inside: avoid; }\n  table.lines th { font-size: 9px; letter-spacing: 1.2px; text-transform: uppercase; color: var(--muted); font-weight: 400; text-align: start; padding: 0 0 8px; border-bottom: 1px solid var(--ink); }\n  table.lines th.num { text-align: end; }\n  table.lines td { padding: 10px 0; border-bottom: 1px solid var(--line); vertical-align: top; }\n  table.lines th + th, table.lines td + td { padding-inline-start: 14px; }\n  .num { text-align: end; white-space: nowrap; }\n  .pn { font-weight: 600; }\n  .sub { font-size: 10px; color: var(--muted); white-space: pre-wrap; }\n\n  .closing { break-inside: avoid; page-break-inside: avoid; display: flex; justify-content: space-between; gap: 32px; margin-top: 10mm; }\n  .aside { flex: 1; min-width: 0; }\n  .aside p { margin: 0 0 10px; white-space: pre-wrap; }\n  .acct { border-collapse: collapse; }\n  .acct td { padding: 1px 0; }\n  .acct td.v { text-align: end; padding-inline-start: 18px; white-space: nowrap; }\n  .totals { width: 42%; border-collapse: collapse; }\n  .totals td { padding: 4px 0; }\n  .totals td.v { text-align: end; white-space: nowrap; }\n  .totals tr.grand td { border-top: 1px solid var(--ink); padding-top: 10px; font-family: \"Noto Naskh Arabic\", \"Times New Roman\", serif; font-size: 18px; }\n  .totals tr.small td { font-size: 10px; color: var(--muted); }\n\n  .signs { display: flex; gap: 48px; margin-top: 26mm; break-inside: avoid; }\n  .signs .s { flex: 1; border-top: 1px solid var(--ink); padding-top: 6px; font-size: 10px; color: var(--muted); }\n  .foot { margin-top: 12mm; font-size: 9.5px; color: var(--muted); }\n\n  @media print {\n    body { background: #fff; }\n    .sheet { margin: 0; padding: 0; width: auto; min-height: 0; box-shadow: none; }\n  }\n</style>\n</head>\n<body>\n<div class=\"sheet\">\n  <header class=\"top\">\n    <div>\n      {% if branch.logo != \"\" %}<img class=\"logo\" src=\"{{ branch.logo }}\" alt=\"\">{% endif %}\n      <div class=\"org-name\"><bdi>{{ org_name }}</bdi></div>\n      <div class=\"org-meta\">\n        {% if branch.company_legal_name != \"\" and branch.company_legal_name != org_name %}<div><bdi>{{ branch.company_legal_name }}</bdi></div>{% endif %}\n        {% if branch.address != \"\" %}<div>{{ branch.address }}</div>{% endif %}\n        {% if branch.phone1 != \"\" %}<div><span class=\"ltr\">{{ branch.phone1 }}</span>{% if branch.phone2 != \"\" %} · <span class=\"ltr\">{{ branch.phone2 }}</span>{% endif %}</div>{% endif %}\n        {% if branch.company_tax_number != \"\" %}<div>ژمارەی باج <span class=\"ltr\">{{ branch.company_tax_number }}</span></div>{% endif %}\n      </div>\n    </div>\n    <div>\n      <div class=\"kind\">پسوڵەی فرۆشتن</div>\n      <div class=\"no\"><span class=\"ltr\">{{ invoice.number }}</span></div>\n      {% case invoice.status %}{% when \"draft\" %}<div class=\"state\">ڕەشنووس</div>{% when \"canceled\" %}<div class=\"state\">هەڵوەشاوە</div>{% endcase %}\n    </div>\n  </header>\n\n  <section class=\"meta\">\n    <div class=\"col\">\n      <div class=\"label\">کڕیار</div>\n      <div class=\"who\"><bdi>{{ customer.name | default: invoice.customer_name | default: \"—\" }}</bdi></div>\n      {% if customer.phones.size > 0 %}<div class=\"muted\">{% for p in customer.phones %}{% unless forloop.first %} · {% endunless %}<span class=\"ltr\">{{ p }}</span>{% endfor %}</div>{% endif %}\n      {% if invoice.delivery_address != \"\" %}<div class=\"muted\">{{ invoice.delivery_address }}</div>{% endif %}\n    </div>\n    <table class=\"facts\">\n      <tr><td class=\"k\">بەروار</td><td class=\"v\"><span class=\"ltr\">{{ invoice.entry_date }}</span></td></tr>\n      {% if invoice.pay_by != \"\" and invoice.type != \"cash\" and invoice.type != \"online_cash\" %}<tr><td class=\"k\">دوا بەرواری پارەدان</td><td class=\"v\"><span class=\"ltr\">{{ invoice.pay_by }}</span></td></tr>{% endif %}\n      <tr><td class=\"k\">جۆری فرۆشتن</td><td class=\"v\">{% case invoice.type %}{% when \"cash\" %}نەقد{% when \"installment\" %}قیست{% when \"online_cash\" %}ئۆنلاین — نەقد{% when \"online_installment\" %}ئۆنلاین — قیست{% when \"partner\" %}هاوبەش (لەسەر هەژمار){% else %}{{ invoice.type }}{% endcase %}</td></tr>\n      <tr><td class=\"k\">دراو</td><td class=\"v\"><span class=\"ltr\">{{ invoice.currency }}</span></td></tr>\n    </table>\n  </section>\n\n  <table class=\"lines\">\n    <thead>\n      <tr><th>بەرهەم</th><th class=\"num\">عەدەد</th><th class=\"num\">نرخ</th><th class=\"num\">کۆ</th></tr>\n    </thead>\n    <tbody>\n      {% for line in invoice.lines %}\n      <tr>\n        <td>\n          <div class=\"pn\"><bdi>{{ line.product_name | default: \"—\" }}</bdi></div>\n          {% if line.brand != \"\" or line.notes != \"\" %}<div class=\"sub\">{% if line.brand != \"\" %}<bdi>{{ line.brand }}</bdi>{% endif %}{% if line.brand != \"\" and line.notes != \"\" %} — {% endif %}{{ line.notes }}</div>{% endif %}\n        </td>\n        <td class=\"num\"><span class=\"ltr\">{{ line.qty }}</span></td>\n        <td class=\"num\"><span class=\"ltr\">{{ line.unit_price }}</span></td>\n        <td class=\"num\"><span class=\"ltr\">{{ line.line_total }}</span></td>\n      </tr>\n      {% endfor %}\n    </tbody>\n  </table>\n\n  <div class=\"closing\">\n    <div class=\"aside\">\n      {% if invoice.notes != \"\" %}<div class=\"label\">تێبینی</div><p>{{ invoice.notes }}</p>{% endif %}\n      {% if balance.shown %}\n      <div class=\"label\">هەژماری کڕیار</div>\n      <table class=\"acct\">\n        <tr><td>قەرزی پێشوو</td><td class=\"v\"><span class=\"ltr\">{{ balance.previous }}</span></td></tr>\n        <tr><td>ئەم پسوڵەیە</td><td class=\"v\"><span class=\"ltr\">+ {{ invoice.final }}</span></td></tr>\n        <tr><td><strong>قەرزی نوێ</strong></td><td class=\"v\"><strong><span class=\"ltr\">{{ balance.new }} {{ invoice.currency }}</span></strong></td></tr>\n      </table>\n      {% endif %}\n    </div>\n    <table class=\"totals\">\n      <tr><td>کۆی نرخ</td><td class=\"v\"><span class=\"ltr\">{{ invoice.subtotal }}</span></td></tr>\n      {% if invoice.discount_raw != 0 %}<tr><td>داشکاندن{% if invoice.discount_percent != \"0\" %} <span class=\"ltr\">{{ invoice.discount_percent }}%</span>{% endif %}</td><td class=\"v\"><span class=\"ltr\">− {{ invoice.discount }}</span></td></tr>{% endif %}\n      {% if invoice.shipping_raw != 0 %}<tr><td>گواستنەوە</td><td class=\"v\"><span class=\"ltr\">{{ invoice.shipping }}</span></td></tr>{% endif %}\n      {% if invoice.tax_raw != 0 %}<tr><td>باج{% if invoice.tax_percentage != 0 %} <span class=\"ltr\">{{ invoice.tax_percentage }}%</span>{% endif %}</td><td class=\"v\"><span class=\"ltr\">{{ invoice.tax }}</span></td></tr>{% endif %}\n      <tr class=\"grand\"><td>کۆی گشتی</td><td class=\"v\"><span class=\"ltr\">{{ invoice.final }} {{ invoice.currency }}</span></td></tr>\n      {% if invoice.down_payment_raw != 0 %}<tr class=\"small\"><td>پێشەکی</td><td class=\"v\"><span class=\"ltr\">{{ invoice.down_payment }}</span></td></tr>{% endif %}\n      {% if base_currency != \"\" and base_currency != invoice.currency and total_base_raw != 0 %}<tr class=\"small\"><td>کۆی گشتی (<span class=\"ltr\">{{ base_currency }}</span>)</td><td class=\"v\"><span class=\"ltr\">{{ total_base }}</span></td></tr>{% endif %}\n    </table>\n  </div>\n\n  <section class=\"signs\">\n    <div class=\"s\">واژۆی کڕیار</div>\n    <div class=\"s\">واژۆ و مۆری فرۆشیار</div>\n  </section>\n  <div class=\"foot\">سوپاس بۆ کڕینەکەتان. · چاپکراوە لە <span class=\"ltr\">{{ generated_at }}</span></div>\n</div>\n</body>\n</html>\n"
}