Till Receipt
A supermarket till receipt as a point-of-sale system prints it: black only, a fixed-pitch face, an 80 mm roll torn off at both ends. Every value comes from the sale's record, the way a till sends it, and the receipt's lines are three components fed from that record. Each shop then gives the kit its own look, so the receipts on this page share their components but not their design.
- The store's own mark. Larkfield Market's badge, a lark rising over ploughed furrows, is drawn in svg beside the name in Oswald, with the tagline from the data under it. The serrated tear of the roll runs along the top and the bottom of the page.
- Item lines.
receipt-linessets each line's description over a smaller note - the quantity, the weight at its price per kilo, the reason for a saving - with its amount and its VAT code. The headings are parameters, so the same lines read "ARTIKEL", "品名" or "MEDICINE". - Totals and details.
receipt-rowssets label and value rows. Each row names its kind:plain,bold,total(larger, ruled above and below) orcompact(the size a 58 mm slip uses), and the kind picks the row's style. - VAT summary.
receipt-tax-summarysets one row per rate - code, rate, net, tax and gross - then the totals, under a caption and headings the document names. - What the shop adds. The saving of the visit in a rounded box, the card payment as the terminal reports it, a survey QR code beside its instructions, the opening hours, and a coupon for the next visit under a dashed cut line, with its own EAN-13 in the in-store range.
- The barcode a return is scanned from. The transaction number as Code 128, its digits printed under the bars in the receipt's own face.
- Archival and accessible. It claims PDF/A-2a and PDF/UA-1. The item and VAT tables have header cells; the detail and total rows are layout, marked as presentation, and the torn edges are watermarks, so a screen reader skips them.
How it's built
The document keeps its own labels and passes each value from the data file into the component:
{
"use": {
"name": "receipt-rows",
"params": {
"rows": [
{ "label": "Subtotal", "value": "$data.sale.subtotal", "kind": "plain" },
{ "label": "Savings", "value": "$data.sale.savings", "kind": "plain" },
{ "label": "TOTAL EUR", "value": "$data.sale.total", "kind": "total" }
]
}
}
}
The item lines come straight from the record's list:
{
"use": {
"name": "receipt-lines",
"params": { "rows": "$data.items", "itemLabel": "DESCRIPTION", "amountLabel": "EUR", "taxLabel": "VAT" }
}
}
Each entry in items is one line: { "name": "BANANAS LOOSE", "note": "0.734 kg × 1.79 /kg", "amount": "1.31", "tax": "Z" }.
A component's styles are named, and a document that defines a style of the same name replaces it. That is how one kit takes each shop's look without a copy of it: the till receipt sets its total larger between double rules by redefining the two styles of the total kind.
{
"styles": {
"rrLabel-total": { "fontSize": 13, "fontFamily": "Receipt", "fontWeight": "bold", "border": "none", "borderTop": "2.4pt double #000000", "borderBottom": "2.4pt double #000000", "paddingTop": 4, "paddingBottom": 3 },
"rrValue-total": { "fontSize": 13, "fontFamily": "Receipt", "fontWeight": "bold", "textAlign": "right", "border": "none", "borderTop": "2.4pt double #000000", "borderBottom": "2.4pt double #000000", "paddingTop": 4, "paddingBottom": 3 }
}
}
Features used: PDF/A-2a, PDF/UA-1 conformance, watermarks, columns, tables, rules, SVG, barcodes (code128, ean13, qrcode), data binding, components
- Output
- Template
- Data
The same sale: card slip and refund
Two more documents from the same shop and the same sale. Their amounts agree with the receipt's.
- Card payment slip. The card terminal's customer copy on a 58 mm roll, printed under the acquirer's mark rather than the store's: a contactless symbol drawn in svg beside SALE, the masked card, the amount large between heavy rules, APPROVED reversed out of a black band, how the cardholder was verified, and the chip data a disputed payment is traced by in a framed box. The card, the terminal and the authorization code are the till receipt's. Its rows are
receipt-rows, the chip data in a kind of the document's own,emv, whose two styles the document defines. - Refund receipt. Two items from the sale returned two days later, under the same Larkfield mark. The original sale and the refund stand side by side, joined by an arrow, the refund reversed out in white on black. A REFUNDED rubber stamp, drawn in svg and turned eleven degrees, sits beside the original receipt number and who sold and refunded the goods. Each returned item carries its reason, the amounts are negatives, the VAT is given back by rate, and the customer and the supervisor each sign in a dashed frame.
- Output
- Template
- Data
- Output
- Template
- Data
Variants: other countries, other trades
Five more receipts on the same three components, each with its own data, language, currency and the lines its country or trade prints, and each with a design of its own.
| Document | Language and paper | What it prints |
|---|---|---|
| Bakery receipt, Germany | German, a 100 mm digital receipt | A warm cream page with the bakery's wheat-ear mark and its name in a serif, the sale details in rounded panels, MwSt codes A and B at 19 % and 7 % in a panel of their own, payment by girocard, and the fiscal device's (TSE) block complete: serial number, transaction, signature counter, start and end times, the signature and its QR code |
| Restaurant check, United States | US English, a 90 mm guest check | An oxblood and gold monogram over the restaurant's name in a serif, the server, table, guests and times in a panel, the items by course with T for taxable, sales tax, a suggested gratuity table worked out on the subtotal, tip, total and signature lines, and a QR code to pay at the table |
| Convenience store receipt, Japan | Japanese, 58 mm | The store's corner-shop mark, its qualified-invoice registration number in a double-ruled box, 領収書 spaced over a double underline, tax-inclusive prices with ※ on each reduced-rate item, the 8 % and 10 % amounts with the tax they include, the e-money balance and points, the store's date seal, and a tear-off coupon with its own EAN-13 |
| Fuel station tax invoice, UAE | English and Arabic, an 80 mm e-receipt | A green and amber brand band, every label in both languages, the pump panel - pump, nozzle, grade, litres, price per litre and the plate of the vehicle - the VAT at 5 % in a panel, the rewards earned, and a QR code that verifies the invoice |
| Pharmacy bill, India | Indian English, a 90 mm digital bill | A teal band with the pharmacy's cross and Rx mark, GSTIN and drug licences, the patient and prescriber with the doctor's registration, each medicine's batch, expiry and HSN code with the Schedule H items marked, CGST and SGST by rate, the round-off to the rupee, the Schedule H warning, and a UPI QR code to pay the bill |
- Labels stay in the document. The components carry no words of their own: the German document passes "Summe EUR", the Japanese one "合計". So a receipt in another language is a new document over the same components, not a copy of them.
- The look stays in the document too. The bakery redefines the kit's styles in its own colours and faces, the restaurant groups its courses as one
receipt-lineseach under a serif heading, the pharmacy and the fuel station set them on tinted panels, and the thermal receipts keep them black: the same component draws each. - The tax summary follows the regime. The German bakery and the Indian pharmacy use
receipt-tax-summary, one with MwSt by code and one with a CGST and an SGST row per rate. The Japanese store, whose prices include the tax, prints the taxable amounts asreceipt-rowsinstead. - Arabic beside English. Each label of the UAE invoice is English beside Arabic, the Arabic inside a
[lang, ar-AE]tag. The engine shapes it and sets it right to left within the line.
- Output
- Template
- Data
- Output
- Template
- Data
- Output
- Template
- Data
- Output
- Template
- Data
- Output
- Template
- Data