{
  "format": "jmeryar-print-template",
  "version": 1,
  "id": "receipt-en",
  "doc_type": "sell_invoice",
  "locale": "en",
  "name": {
    "en": "Till receipt (80 mm)",
    "ku": "پسوڵەی کاشێر (80 ملم)",
    "ar": "إيصال الكاشير (80 مم)",
    "fa": "رسید صندوق (۸۰ میلی‌متر)",
    "de": "Kassenbon (80 mm)"
  },
  "description": {
    "en": "The sell invoice as a narrow till receipt for an 80 mm thermal printer, one item per line with quantity × price. One line switches it to 58 mm.",
    "ku": "پسوڵەی فرۆشتن وەک پسوڵەیەکی باریکی کاشێر بۆ پرینتەری گەرمی 80 ملم، هەر بەرهەمێک لە دێڕێکدا لەگەڵ عەدەد × نرخ. بە یەک دێڕ دەگۆڕدرێت بۆ 58 ملم.",
    "ar": "فاتورة البيع كإيصال كاشير ضيق لطابعة حرارية 80 مم، صنف في كل سطر مع الكمية × السعر. سطر واحد يحوّله إلى 58 مم.",
    "fa": "فاکتور فروش به شکل رسید باریک صندوق برای چاپگر حرارتی ۸۰ میلی‌متری، هر کالا در یک خط با تعداد × قیمت. با یک خط به ۵۸ میلی‌متر تبدیل می‌شود.",
    "de": "Die Verkaufsrechnung als schmaler Kassenbon für einen 80-mm-Thermodrucker, ein Artikel pro Zeile mit Menge × Preis. Eine Zeile stellt auf 58 mm um."
  },
  "content": "{%- comment -%}\n  Sell invoice — RECEIPT (English). From the jmeryar template library.\n  For an 80 mm thermal till printer: one narrow column, no colour, each line as\n  name then quantity × price = amount. Set the printer's paper to 80 mm (roll);\n  for a 58 mm printer change --paper below to 58mm. Every figure arrives already\n  written the way this install writes numbers and dates.\n{%- endcomment -%}\n{%- assign org_name = branch.invoice_title | default: branch.company_name | default: branch.name | default: invoice.branch_name -%}\n<!doctype html>\n<html lang=\"en\" dir=\"ltr\">\n<head>\n<meta charset=\"utf-8\">\n<title>Invoice {{ invoice.number }}</title>\n<style>\n  :root { --paper: 80mm; }\n  * { box-sizing: border-box; }\n  html, body { margin: 0; padding: 0; }\n  body { font-family: -apple-system, \"Segoe UI\", Roboto, \"Helvetica Neue\", Arial, sans-serif; color: #000; font-size: 12px; line-height: 1.45; background: #e5e7eb; }\n  .roll { width: var(--paper); margin: 12px auto; padding: 5mm 4mm 8mm; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.2); }\n  .ltr { direction: ltr; unicode-bidi: isolate; font-variant-numeric: tabular-nums; }\n  @page { size: 80mm auto; margin: 3mm; }\n\n  .c { text-align: center; }\n  .logo { display: block; margin: 0 auto 4px; max-height: 40px; max-width: 60%; object-fit: contain; filter: grayscale(1); }\n  .org { font-size: 15px; font-weight: 800; }\n  .small { font-size: 10.5px; }\n  .cut { border-top: 1px dashed #000; margin: 7px 0; }\n  .row { display: flex; justify-content: space-between; gap: 8px; }\n  .row .v { text-align: end; white-space: nowrap; }\n  .kind { font-size: 13px; font-weight: 800; letter-spacing: .5px; }\n  .item { margin: 5px 0; break-inside: avoid; }\n  .item .name { font-weight: 700; }\n  .item .calc { display: flex; justify-content: space-between; gap: 8px; }\n  .grand { font-size: 16px; font-weight: 800; }\n  .state { display: inline-block; border: 1px solid #000; padding: 0 6px; font-size: 10px; font-weight: 800; }\n  .thanks { margin-top: 8px; font-weight: 700; }\n\n  @media print {\n    body { background: #fff; }\n    .roll { margin: 0; width: auto; padding: 0; box-shadow: none; }\n  }\n</style>\n</head>\n<body>\n<div class=\"roll\">\n  <div class=\"c\">\n    {% if branch.logo != \"\" %}<img class=\"logo\" src=\"{{ branch.logo }}\" alt=\"\">{% endif %}\n    <div class=\"org\"><bdi>{{ org_name }}</bdi></div>\n    {% if branch.address != \"\" %}<div class=\"small\">{{ branch.address }}</div>{% endif %}\n    {% if branch.phone1 != \"\" %}<div class=\"small\"><span class=\"ltr\">{{ branch.phone1 }}</span></div>{% endif %}\n    {% if branch.company_tax_number != \"\" %}<div class=\"small\">Tax No. <span class=\"ltr\">{{ branch.company_tax_number }}</span></div>{% endif %}\n  </div>\n  <div class=\"cut\"></div>\n  <div class=\"c kind\">Invoice <span class=\"ltr\">{{ invoice.number }}</span></div>\n  {% case invoice.status %}{% when \"draft\" %}<div class=\"c\"><span class=\"state\">Draft</span></div>{% when \"canceled\" %}<div class=\"c\"><span class=\"state\">Canceled</span></div>{% endcase %}\n  <div class=\"row small\"><span>Date</span><span class=\"v ltr\">{{ invoice.entry_date }}</span></div>\n  <div class=\"row small\"><span>Bill to</span><span class=\"v\"><bdi>{{ customer.name | default: invoice.customer_name | default: \"—\" }}</bdi></span></div>\n  {% if invoice.accountant != \"\" %}<div class=\"row small\"><span>Cashier</span><span class=\"v\"><bdi>{{ invoice.accountant }}</bdi></span></div>{% endif %}\n  <div class=\"cut\"></div>\n\n  {% for line in invoice.lines %}\n  <div class=\"item\">\n    <div class=\"name\"><bdi>{% if line.brand != \"\" %}{{ line.brand }} {% endif %}{{ line.product_name | default: \"—\" }}</bdi></div>\n    <div class=\"calc\"><span class=\"ltr\">{{ line.qty }} × {{ line.unit_price }}</span><span class=\"ltr\">{{ line.line_total }}</span></div>\n  </div>\n  {% endfor %}\n\n  <div class=\"cut\"></div>\n  <div class=\"row\"><span>Subtotal (<span class=\"ltr\">{{ invoice.total_qty }}</span>)</span><span class=\"v ltr\">{{ invoice.subtotal }}</span></div>\n  {% if invoice.discount_raw != 0 %}<div class=\"row\"><span>Discount</span><span class=\"v ltr\">− {{ invoice.discount }}</span></div>{% endif %}\n  {% if invoice.shipping_raw != 0 %}<div class=\"row\"><span>Shipping</span><span class=\"v ltr\">{{ invoice.shipping }}</span></div>{% endif %}\n  {% if invoice.tax_raw != 0 %}<div class=\"row\"><span>Tax</span><span class=\"v ltr\">{{ invoice.tax }}</span></div>{% endif %}\n  <div class=\"row grand\"><span>Total</span><span class=\"v ltr\">{{ invoice.final }} {{ invoice.currency }}</span></div>\n  {% if invoice.down_payment_raw != 0 %}<div class=\"row small\"><span>Down payment</span><span class=\"v ltr\">{{ invoice.down_payment }}</span></div>{% endif %}\n  {% if balance.shown %}\n  <div class=\"cut\"></div>\n  <div class=\"row small\"><span>Previous balance</span><span class=\"v ltr\">{{ balance.previous }}</span></div>\n  <div class=\"row small\"><span>New balance</span><span class=\"v ltr\">{{ balance.new }}</span></div>\n  {% endif %}\n  {% if invoice.notes != \"\" %}<div class=\"cut\"></div><div class=\"small\">{{ invoice.notes }}</div>{% endif %}\n  <div class=\"cut\"></div>\n  <div class=\"c thanks\">Thank you for your business.</div>\n  <div class=\"c small\"><span class=\"ltr\">{{ generated_at }}</span></div>\n</div>\n</body>\n</html>\n"
}