Skip to main content

Print templates

Print templates let you generate documents out of LogiFlow: bills, acts, registers, forms for requests and shipments. Once a template is configured, it automatically substitutes data from a financial document, a request or a shipment into a ready-made file.

Template format — Excel only

LogiFlow works only with Excel templates in the .xlsx and .xlsm formats. The old .xls and .xlsb formats are not accepted: open the file in Excel and save it as .xlsx. A file with a password to open will not upload either — save it without a password. The template must not contain macros. The DOCX (Word), PDF and HTML formats are not supported for uploading a template. The finished document, however, can be obtained in two formats — PDF or Excel (.xlsx): the format is chosen in the preview window.

Where they are located​

Section Settings → Documents and UI → Print templates.

Company templates can be created and edited by the administrator and the head. Global templates (shared across all companies) are created only by the platform administrator.

For which entities​

A template is created for one of three categories:

CategoryValueData source
FinancefinanceFinancial document (bill/payment)
ShipmentsshipmentShipment
RequestsrequestRequest
There is no counterparty and no "operations"

There is no separate template category for a counterparty. Financial documents are covered by the "Finance" category.

Creating a template​

  1. Click "Add template" — the "Print template upload" window opens.
  2. Upload the template file — an Excel file (.xlsx or .xlsm) with variables in cells in the form {{...}}. The maximum size is 10 MB.
  3. Enter a name — how the template will be called in the print menu.
  4. Choose a category: Requests, Shipments or Finance.
  5. If needed, add a description.
  6. Click "Upload template".

The file goes through a security check (Excel structure, absence of suspicious macros, protection against "zip bombs"). If the file is not a valid Excel file, the system rejects it.

Variables in a template​

Variables are written directly in the cells of the Excel file in the {{path.to.value}} format. These are flat placeholders — a reference to a value by a dotted path.

No Handlebars syntax

Constructs such as {{#each ...}}, {{#if ...}}, {{/each}} are not supported. Loop and condition logic cannot be written in a template — there is only value substitution and special dynamic tables (see below).

Examples (the "Finance" category)​

{{finance.number}} — document number
{{finance.amount_formatted}} — amount with formatting
{{finance.payment_date_ru}} — payment date spelled out / in the Russian format
{{finance.operation_type}} — operation type
{{currency.code}} — currency code
{{article.name}} — article

{{account.name}} — account/organization name
{{account.requisites.inn}} — TIN
{{account.requisites.kpp}} — KPP (tax registration reason code)
{{account.requisites.bank_name}} — bank
{{account.requisites.bank_account}} — settlement account
{{account.requisites.correspondent_account}} — correspondent account
{{account.requisites.bik}} — BIC
{{account.requisites.legal_address}} — legal address

{{client.name}} — client name
{{client.phone}} — client phone

Examples (the "Request" category, tariff)​

{{request.rate}} — tariff conditions in a single line: "3.50 EUR / 1 kg"
{{request.tariff_name}} — tariff name
{{request.tariff_rate}} — rate as a number: "3.50"
{{request.tariff_currency}} — currency code: "EUR"
{{request.tariff_unit}} — unit of measurement: "kg" or "m³"

The values are taken from the snapshot of conditions recorded in the request when the tariff was selected, and not from the current state of the tariff reference. For a request without a tariff all these variables are substituted with an empty string.

The tariff is not substituted into a document for a warehouse worker

If the print form is generated by a user with the Warehouse worker role, the tariff variables are substituted as empty — the rate is hidden from this role on all paths, including printing.

Dynamic tables​

For repeating rows (service items, custom fields) a special {{path.table}} syntax is used — the system expands it into several rows:

{{service_items.table}} — table of the document's service items
{{custom_fields.table}} — table of custom fields (for finance)
{{custom.table}} — table of custom fields (for shipments/requests)
{{custom.table:name,value}} — table with explicitly specified columns

Referring to a specific element by index is also available:

{{custom.items[0].name}} — the name of the first custom field
{{custom.items[0].value}} — the value of the first custom field

The "Variables help" button​

On the Print templates page (at the top right) there is a "Variables help" button. It opens the full list of available variables by category (Financial operation, Account/Cash desk, Account/cash desk requisites, Client requisites, Counterparty, etc.), including the custom fields you created earlier. The list can be exported to Excel (the "Download XLS" button).

Do not guess names

Always check against the "Variables help" — it has the up-to-date names. A typo in a path means the value simply will not be substituted.

Using a template​

The card of a financial document / request / shipment has a Print button (or document export). A list of templates available for this entity opens. Every template has two buttons:

  • Download — offers a format: PDF document or Excel (XLSX). The document is generated straight away in the chosen format.
  • Preview — opens the document right in a window. The preview has its own download button (the down arrow in the top bar) with the same format choice. The PDF from there is exactly what you see on screen — the document is not rebuilt a second time.

After generation the system may return warnings if some of the variables found no data — check such places in the document.

Good practices​

  • Start from a real document. Take a ready-made Excel file, replace the values in the cells with {{...}} variables, and upload it. This is faster than building one from scratch.
  • Test on real data. After uploading, generate a document from an actual bill/request and check every cell.
  • Do not write business logic into a template. A template is for formatting. All calculations are done by the system; a template only substitutes ready values (use the *_formatted/*_ru variants for a nice output).
  • Use versions. If you change a template substantially, create a new one under a different name so that old documents can be reproduced.

CMR annex in your own template​

With more than six cargo items, the stock CMR prints a second sheet — "Приложение №1" (Annex No. 1) with the full list and a TOTAL row. This is a property of the template file, not of the document type: the system does not recognise a form "as a CMR" by its name. To make your own form print the annex too:

  1. Use the stock CMR template as a basis (it already has two sheets) — or add a second sheet to your file.
  2. In the header of the annex sheet (rows 1–3), put a cell with {{#keep_sheet_if:cargo.annex.needed}} — the sheet goes into the document only when the table of boxes 6–12 overflows; otherwise it is removed entirely.
  3. In a table row, put {{cargo.annex.table}} — it is repeated for all cargo items (columns: No., ADR marks, number of packages, packaging, description, HS code (ТН ВЭД), weight, volume) plus a TOTAL row.
  4. The mention in box 5 "Documents attached" is provided by the {{cargo.annex.note}} variable — when there is no overflow it is empty.

The "more than six items" threshold is set by the system according to the number of rows on the stock form and does not depend on the size of the table in your form.

Known limitations​

  • Templates are Excel only — no DOCX, PDF, HTML. The finished document is exported as XLSX or PDF; the format is chosen when downloading.
  • There are no loops/conditions ({{#each}}, {{#if}}); for repeating rows use the dynamic tables {{...table}}.
  • External links and suspicious macros in a file are blocked by the security check.

What's next​