Document templates
Settings → Configurations → Document templates is where a receipt, invoice, or ticket gets its layout. Printing a document, a POS sale, or a fiscal copy uses one of these templates. You need permission to edit Configurations.
The page has four tabs. Each tab is a different file kind. A row shows the template name, the language, and tags such as Receipt or HTML.
| Tab | What you store | When it is used |
|---|---|---|
| Print templates | HTML, including the 70 mm receipt | On-screen print and the POS receipt |
| PDF templates | HTML that is turned into a PDF | Download or email a PDF |
| Word templates | An uploaded .docx file | A Word download. Placeholders inside the document are replaced the same way as in HTML |
| XML | An XML file | A feed or a fiscal or partner file that expects XML |
Add or edit a template
- Open the tab for the kind of file.
- Choose Add template, or the pencil on an existing row.
- Name the template. The name is what people see in the print picker.
- Choose the language. Labels such as “Receipt” and “Total” are printed in that language. The English, Armenian, and Russian interfaces are the ones the product translates. A template can exist once per language.
- Choose the document types that may use it. A template is offered only for those types.
- Write the body, or upload the Word file. Save.
Deleting a template removes it from the picker. Documents that were already printed keep the file you downloaded. The next print asks you to pick again.
The product ships a default 70 mm POS receipt in HTML. You can copy it and change the wording. A draft document can show a “not confirmed” watermark and a yellow notice when the template includes {draft_watermark} and {draft_notice}.
Document types
A template can be limited to any of these:
| Type | Typical use |
|---|---|
| Sales | Customer invoice or receipt |
| Sales return | The return of a sale |
| Purchase | Supplier bill |
| Purchase return | Goods sent back to a supplier |
| Transfer | Branch transfer |
| Stock adjustment | A stock count |
| Manufacturing | A production document |
| Order | A supplier order |
| Ticket | A project request |
| Money in, money out, transfer | A finance movement |
| Shift | A cash-register shift |
How placeholders work
Type a name in braces, for example {company_name}. On print, Lua CRM replaces it with the value from that document. An unknown name becomes blank. It does not stop the print.
Dates also have a day/month/year twin. If {document_date} is 2026-11-04, {document_date_dmy} is the day-first form. The same _dmy suffix works on the other date fields.
To keep only part of a value, use {substr(field, start)} or {substr(field, start, length)}. Counting starts at 0. {substr(company_tin, 0, 4)} prints the first four characters of the tax ID.
Repeating blocks use double braces:
{{#items}}…{{/items}}repeats once per line{{#itemsCombined}}…{{/itemsCombined}}repeats once per item, with quantities added together{{#payments}}…{{/payments}}repeats once per payment{{#itemCategories}}…{{/itemCategories}}repeats once per catalog group on the document
Inside a block, use the line fields, not the document totals.
Custom fields are {contact_cf_12}, {document_cf_12}, or on a line {cf_12}, where 12 is the custom field’s ID from Settings → Other → Custom fields.
Company and branch
| Placeholder | Prints |
|---|---|
{company_name} | Trading name |
{company_legal_name} | Registered name |
{company_tin} | Tax ID |
{company_phone} {company_email} {company_address} | Main contact details |
{company_bank_name} {company_bank_account} | Bank details |
{company_entity_type} {company_entity_type_full} | Legal form, short and long |
{company_director} | Director |
{company_logo} {logo} | The logo as an image |
{logo_url} | The logo address |
{company_has_vat} {company_vat_rate} | Whether VAT applies, and the rate |
{branch_name} {branch_address} | The document’s branch |
People
| Placeholder | Prints |
|---|---|
{added_by} {added_by_initials} | Who created the document |
{responsible_manager} {responsible_manager_initials} {responsible_manager_phone} | The responsible employee |
{contact_name} {contact_firstname} {contact_lastname} | The person on the document |
{customer_name} | Company name when the contact is a legal entity, otherwise the person’s name |
{contact_legal_entity_name} | Legal name |
{contact_email} {contact_phone} {contact_address} {contact_delivery_address} | Main email, phone, address, and the delivery address |
{contact_birthday} {contact_balance} | Birthday and the open balance |
{legal_company_name} {legal_name} {legal_tin} | The counterparty company, or the employer when the contact is a person who works for one |
{legal_entity_type} {legal_entity_type_full} {legal_ceo} | Legal form and director |
{legal_address} {legal_phone} {legal_email} | That company’s contacts |
{legal_bank_name} {legal_bank_account} | That company’s bank |
Document totals
| Placeholder | Prints |
|---|---|
{document_id} {document_name} | Internal ID and the number people see |
{document_type} {document_type_label} | The type code and the translated name |
{document_date} {document_datetime} | Date, and date with time |
{document_status} {is_draft} | Status, and 1 when it is still a draft |
{currency_code} {currency_symbol} | The document currency |
{document_exchange_rate} | Rate against the company currency |
{document_gross_total} | Total before discount |
{document_discount_percent} {document_discount_amount} | Discount |
{document_total} {document_total_with_sale} | Net total |
{document_total_paid} {document_balance} | Paid and still due |
{document_total_words} {document_total_paid_words} {document_balance_words} | Those amounts in words |
{last_payment_amount} {last_payment_date} | The latest payment |
{payments_count} | How many payments |
{items_count} {items_quantity} | Number of lines, and the sum of quantities |
{items_table} | A ready-made lines table, with images |
{items_table_without_images} | The same table without images |
{items_combined_table} {items_combined_table_without_images} | Lines combined by item |
{draft_watermark} {draft_notice} | The “not confirmed” mark, empty when the document is confirmed |
One line
Use these inside {{#items}} or {{#itemsCombined}}.
| Placeholder | Prints |
|---|---|
{item_position} | 1, 2, 3… |
{item_name} {product_name} {name} | Item name |
{sku} {barcode} {hs_code} | Codes |
{item_description} | Line description, on one line |
{quantity} {unit_name} | Quantity and unit. The unit falls back to “pc” |
{gross_unit_price} {unit_price} | Price before and after the line discount |
{discount_percent} {discount_amount} | Line discount |
{gross_amount} {amount} | Line total |
{item_category} {item_category_parent} | Catalog group and its parent |
{item_image} {item_image_url} | Photo, as an image or as an address |
{item_date} | Line date |
{dental_formula_code} | Tooth code, when the line has one |
{membership_start_date} {membership_end_date} | Membership dates, only on a membership line |
{membership_months_count} {membership_price_per_month} | Length and the monthly split of the line amount |
Payments and fiscal data
Inside {{#payments}}: {payment_name} and {payment_amount}.
When a fiscal receipt succeeded for the document:
| Placeholder | Prints |
|---|---|
{fiscal_number} | Fiscal number |
{fiscal_verification_number} | Verification number |
{fiscal_time} {fiscal_time_dmy} | Device time |
{fiscal_tin} | Taxpayer ID on the receipt |
{fiscal_seq} {fiscal_rseq} | Sequence numbers |
{fiscal_req} {fiscal_serial} | Request and device serial |
{fiscal_qr} | QR code image |
{fiscal_total} | Amount the device recorded |
Translated headings
{label_receipt}, {label_invoice}, {label_date}, {label_total}, {label_discount}, {label_quantity}, {label_product}, {label_customer}, {label_tin}, {label_thank_you}, and the other {label_…} names print the heading in the template’s language. Use them instead of typing “Total” so an Armenian template does not stay in English.
Tips
- A blank placeholder usually means that field is empty on the document, not that the name is misspelled. Compare it with the tables above.
- Word files must keep the braces as plain text. If the word processor splits
{company_name}across formatting, the name will not be replaced. - Combined lines are better for a receipt. Separate lines are better when each discount must stay visible.
- Membership dates are empty on a product line. That is expected.