Repository navigation
fix: print cash tendered and change on receipts - #845
Conversation
|
Navigate logical layers of code changes, visualize relationships, and explore their blast radius. No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository: FreeOpenSourcePOS/FloCafe/.coderabbit.yaml Review profile: CHILL Plan: Advanced Run ID: ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (29)
Included review availability: Your plan provides up to 2 included reviews per hour; 1 remains after this review. 📝 WalkthroughWalkthroughPrint documents now preserve optional cash tendered and change values and add cash-received and positive-change rows for eligible cash payments. Backend, browser, WebUSB, raster, and merchant-template paths render these rows. Frontend normalization and localized labels were updated, with tests covering ordering, formatting, and legacy behavior. ChangesCash Receipt Projection
Priority: ➖ Normal Estimated code review effort: 3 (Moderate) | ~25 minutes Change: Bug fix Sequence Diagram(s)sequenceDiagram
participant PaymentDetails
participant buildBillDocument
participant paymentDisplayRows
participant ReceiptRenderer
PaymentDetails->>buildBillDocument: provide applied, tendered, and change amounts
buildBillDocument->>paymentDisplayRows: provide payment line with projected rows
paymentDisplayRows->>ReceiptRenderer: return applied, cash-received, and positive-change rows
ReceiptRenderer->>ReceiptRenderer: format and print each row
Merge Risk: ⚪ Minimal · up to The receipt change is mergeable after normal checks; no concrete blocking issue is established by the supplied evidence. 🚥 Pre-merge checks | ✅ 3 | ❌ 2❌ Failed checks (2 warnings)
✅ Passed checks (3 passed)
Full details: Description checkExplanation The description includes a clear summary, linked issue, and validation commands, but it omits the required Scope, Compatibility & data safety, Screenshots, Cross-cutting surfaces, and Contributor checklist sections. It also lists no validation results. Full details: Docstring CoverageExplanation Docstring coverage is 63.16% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 19 functions across 14 files. (15 skipped: 15 unsupported.)
✨ Finishing Touches 💡 1📝 Generate docstrings 💡
🧪 Generate unit tests (beta)
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. Comment |
Summary
Validation
npm run test:print-documentnpm run test:print-paritynpm run test:print-labelsnpm run test:receipt-printingnpm run test:merchant-print-templatesnpm run test:tax-pack-managementnpm run test:rasternpm run test:printernpm run test:thermal-capabilitiesnpm run test:issue-214npm run i18n:checknpm run lintnpm run buildnpm run build:frontendfixes #770
Summary by CodeRabbit
New Features
Documentation