Skip to content

Fix receipt auto-printing and receipt designer options - #1369

Merged
sridharkalaibala merged 6 commits into
developfrom
fix/system-default-autoprint
Oct 16, 2026
Merged

sridharkalaibala merged 6 commits into
developfrom
fix/system-default-autoprint

Conversation

@sridharkalaibala

@sridharkalaibala sridharkalaibala commented Oct 16, 2026 •

Copy link
Copy Markdown
Contributor

Fix receipt auto-printing and receipt designer options

Selecting System Default could route a Windows payment receipt to the first enumerated printer, even when it was offline. Designed thermal counter receipts could also pass an empty printer name to RAW printing. Both paths now resolve the actual Windows default and report a missing printer instead of guessing.

Receipt design changes:

  • Allow custom footer text, with the existing default retained for blank values and a switch to hide it. Validate length and escape printed text.
  • Omit placeholder addresses and fall back to a valid branch address.
  • Omit zero-valued tax rows, while preserving genuine small tax amounts and saved labels.
  • Use India GST sample splits based on country, even without the old GST flag. Use VAT sample/fallback labels for UK and South Africa and GST for Australia; other saved tax labels remain unchanged. Example rates are explicitly illustrative.

Validation: 67 receipt designer tests passed, including save/reload, HTML escaping, all paper sizes, zero taxes and small non-zero taxes. Auto-print regressions passed, and actual Electron/Windows tests delivered a counter receipt and the previously failed payment receipt to the Posnic Reception capture queue. This confirms Windows delivery, not physical paper output. Local pre-push checks passed except for a newly introduced placeholder translation tag; that tag and English map were fixed, and all 124 i18n, international-language and receipt tests then passed, including the Dutch completeness check. Lint, formatting, API documentation, packaging and attribution passed. The documented push-hook escape was used after independent verification because the hook environment breaks the API docs Git comparison; GitHub required checks remain enforced.

Sync: custom footer text stays inside the existing branch receipt_designs object, validated by the shared contract. The existing tenant-scoped branches lane is present in POS, Gateway and the bundled sync agent. No new collections, commands, jobs or sync lanes are introduced. Printer selection and execution stay local. Cross-device live sync of the new footer field has not been exercised in this change; save/reload and normalization round trips are covered.

Release: merge into develop before promoting develop to main. This does not publish a desktop release; the private installer signing remains separate.

@sridharkalaibala sridharkalaibala changed the title Fix auto-print with System Default receipt printers Fix receipt auto-printing and receipt designer options Oct 16, 2026
@sridharkalaibala
sridharkalaibala merged commit f3964a2 into develop Oct 16, 2026
12 checks passed
@github-actions github-actions Bot added the ready for QA Merged to develop and live on develop.posnic.io - anyone can test it label Oct 16, 2026
@github-actions

Copy link
Copy Markdown
Contributor

Merged to develop. Anyone can test this - you do not need write access.

Try it at https://develop.posnic.io, or run it yourself:

git fetch origin develop && git checkout develop
npm install && npm --prefix api install
npm run dev   # then http://localhost:3000

When you have tested it, say what you did and what happened, and set
QA passed or QA failed. If you cannot set labels, just comment -
a maintainer will.

Reporting that something is broken is as useful as fixing it. It is
better found here than by a shopkeeper.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ready for QA Merged to develop and live on develop.posnic.io - anyone can test it

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant