Repository navigation
fix(print): always fall back to a printable currency prefix - #1555
Conversation
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 reviews are paused because your trial has ended. Ask your workspace admin to add credits to resume reviews. Manage billing |
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the
|
|
@coderabbitai review |
|
@greptileai review |
Action not completed
|
[Medium impact] The changes appear safe to merge; no blocking issues were found.
|
Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
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
₼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 inshared/print/currency.ts.resolveCurrencyPrefixcan no longer return non-ASCII text on its fallback path; unknown symbols print the ISO code.¥like¥in the WebUSB receipt encoders.test:currency), AZN/JPY coverage in issue-266, AZN Z-report body in cash-closures.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 fullnpm test.🤖 Generated with Claude Code