Substitutions in a header and a footer
The six requisites the till expands in a header or footer before a template sees the text.
The free-form texts of a document — the guest bill header and footer, the report header — are set in the back office, under Administration → Receipt templates. The setting text may carry ${…} substitutions, and the factory values are built from them.
Exactly six requisites are substituted: the outlet name and its actual address, the legal entity name and its registered address, the tax id and the phone. A variable name outside that list cannot be saved.
The till expands them before the value reaches a template. A template always receives finished text: seeing a ${…} in a property value is impossible, and substituting something of your own from a template more so.
Two consequences account for most of the surprises.
The requisites are already printed. Since the factory header is built from substitutions, the outlet name and the tax id are usually already in it. Printing CafeName, CafeAddress or TaxId next to it shows the reader the same thing twice.
The value arrives as text. Stock templates escape it, so markup typed into the setting — a QR code tag, say — is printed literally, as a line of characters. Markup takes effect only if a template writes the field unescaped. That brings the graver risk: an ampersand or an angle bracket in ordinary setting text, in a name like "Ромашка & Ко", breaks the whole document and nothing is printed at all.
The properties this concerns: BillHeader, BillFooter and ReportHeader.