Skip to content

fix(print): always fall back to a printable currency prefix - #1555

Merged
itsbkm merged 2 commits into
mainfrom
fix/backup-restore-schema-self-repair
Nov 13, 2026
Merged

itsbkm merged 2 commits into
mainfrom
fix/backup-restore-schema-self-repair

Conversation

@itsbkm

@itsbkm itsbkm commented Nov 13, 2026

Copy link
Copy Markdown
Contributor

Problem

Stores using AZN could not print the Z report: ₼ had no ASCII fallback, so thermal printers refused the financial row and the print failed.

Changes

  • Map ₼ and other missing currency symbols (GEL, KZT, KGS, KHR, LAK, MNT, AMD, AFN, LBP, GHS, XOF, fullwidth yen ¥, prefixed and Arabic forms) to ISO codes in shared/print/currency.ts.
  • resolveCurrencyPrefix can no longer return non-ASCII text on its fallback path; unknown symbols print the ISO code.
  • Treat ¥ like ¥ in the WebUSB receipt encoders.
  • Tests: exhaustive currency x locale ASCII check (wired into test:currency), AZN/JPY coverage in issue-266, AZN Z-report body in cash-closures.
  • Also adds the optional XERJ code-search tooling (search:* scripts, scripts/dev/xerj.cjs, .xerjignore, docs/guides/code-search.md).

Verification

Ran test:currency, test:issue-266-currency-symbol-print, test:cash-closures, test:printer, test:print-parity, test:receipt-column-oracle, test:thermal-capabilities, test:script-coverage, lint, build, build:frontend, docs:check. Not run on a physical printer or the full npm test.

🤖 Generated with Claude Code

A currency symbol without an ASCII fallback (for example the Azerbaijani
manat) made thermal printers refuse financial rows, which blocked Z report
printing for AZN stores.

- Map ₼ and the other missing symbols (GEL, KZT, KGS, KHR, LAK, MNT, AMD,
  AFN, LBP, GHS, XOF, JPY fullwidth yen, prefixed and Arabic forms) to ISO
  codes.
- resolveCurrencyPrefix can no longer return non-ASCII text on its fallback
  path; unknown symbols print the ISO code.
- Treat the fullwidth yen like the ASCII yen in the WebUSB encoders.
- Add an exhaustive currency x locale regression test (wired into
  test:currency) plus AZN and JPY coverage in the issue-266 and
  cash-closures suites.

Also adds the optional XERJ code-search tooling: search:* npm scripts,
scripts/dev/xerj.cjs, .xerjignore, and docs/guides/code-search.md.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
@qodo-code-review

Copy link
Copy Markdown

ⓘ Qodo reviews are paused because your trial has ended. Ask your workspace admin to add credits to resume reviews. Manage billing

@coderabbitai

coderabbitai Bot commented Nov 13, 2026 •

Copy link
Copy Markdown
Contributor

Explain Change →

Important

Review skipped

Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

Run configuration

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • Trigger review
Finishing Touches

Generate unit tests (beta)

  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

@itsbkm

itsbkm commented Nov 13, 2026

Copy link
Copy Markdown
Contributor Author

@coderabbitai review

@itsbkm

itsbkm commented Nov 13, 2026

Copy link
Copy Markdown
Contributor Author

@greptileai review

@coderabbitai

coderabbitai Bot commented Nov 13, 2026 •

Copy link
Copy Markdown
Contributor
Action not completed

Head commit changed.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@greptile-apps

greptile-apps Bot commented Nov 13, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerView in GreptileConfidence Score: 5/5

[Medium impact] The changes appear safe to merge; no blocking issues were found.

Summary

This PR adds printable currency fallbacks and optional local code-search tools. The latest update fixes Windows command-shim launching for Codex setup.

  • Thermal printers use printable currency prefixes for more currencies.
  • Contributors can search local code and documentation with XERJ.

The previous Windows launch issue is addressed. No new actionable issues were found. Tests were not run during this source-only review.

Reviews (3) · Last reviewed commit: "fix(dev): launch Windows .cmd shims for ..." · Reviewed by Greptile

Comment thread scripts/dev/xerj.cjs Resolved
@itsbkm
itsbkm merged commit 177f643 into main Nov 13, 2026
23 checks passed
@itsbkm
itsbkm deleted the fix/backup-restore-schema-self-repair branch November 13, 2026 18:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant