The arithmetic of a counter bill is small, but it is the part a shopkeeper is held to. The commonest error is handling an inclusive tax as though it were exclusive: with an inclusive tax the marked price already contains it and the tax must be worked backwards out of the total, not added on top. Both modes are here, with per-line and whole-bill discounts applied in the right order, optional rounding to a whole unit with the round-off shown, and change broken into notes and coins. The receipt is laid out in characters for a 58 or 80 mm roll and exports as a PDF at that width.
Features
Inclusive or exclusive tax, worked correctly either way
Per-line discounts applied before tax, bill discount applied after
Tax banded by rate, as a receipt is required to show
Optional rounding to a whole unit, with the round-off printed
Change due, broken into notes and coins
Laid out in characters for a 58 mm or 80 mm roll
Copy as text, or export a PDF at the roll width
How to use the POS Billing & Receipts
Fill in the shop details once
Add each item with its quantity, price and tax rate
Choose whether tax is included in the price or added on
Enter the cash tendered if you need the change, then save the receipt
Example
Input
2 × Filter coffee 250g at 100.00, 18% added on
Output
Subtotal 200.00 · Tax 18% 36.00 · TOTAL 236.00
With inclusive tax the same line totals 200.00 and the tax is 30.51.
Common errors & troubleshooting
The total is higher than the marked prices. — Tax is set to be added on. If your prices already include tax, switch to inclusive and the total will match what the customer expects.
The round-off line shows a negative value. — That is correct — rounding down means the customer pays less than the computed total, and the receipt records the difference either way.
A long item name is cut off. — The roll is only 32 characters wide at 58 mm. Switch to the 80 mm width, or shorten the name.
The bill number did not advance. — It advances when you save a receipt as a PDF. Copying the text does not consume a number.
Frequently asked questions
Does this keep a record of my sales?
No. Each bill exists while you are working on it and is gone when the page reloads. Save the PDFs for your own records.
Will the receipt print on a thermal printer?
The PDF is sized to the roll width and set in a monospaced face, so it prints at the right width through a normal print dialog. Direct printer commands are not sent.
Why does the receipt show tax by rate rather than one total?
Because a customer with items at different rates is entitled to see the split, and most tax rules require it on the document.
How are discounts and tax ordered?
A line discount comes off before tax is worked out for that line. The bill discount comes off the total after tax. That is the usual retail convention.
Can I use a currency other than rupees?
Yes — type whatever symbol you use, and the change breakdown works from the denominations listed. The arithmetic itself is currency-agnostic.