Two operator-feedback follow-ups bundled into one Gate cycle. (A) Skip-preview path on the success banner — post-sale Print now fires the print dialog directly without the preview modal. The /orders per-row Print still goes through the modal (operators may want to verify older orders before reprinting). (B) Daily report split — aggregateNativeDailyReport returns totalLineDiscount + totalOrderDiscount separately so operators can see how much was given as per-line comp/promo vs how much was knocked off the whole ticket.
LastOrderBanner drops the modal hop. Print button calls handlePrint which reads the receipt HTML from a hidden ref'd <KhmerReceipt> mount and hands it to the existing openPrintWindow iframe helper. Post-sale operators get a one-click print, just like before the modal landed yesterday.ReceiptPreviewModal still imports + renders on app/(authed)/orders/starter-orders-client.tsx. The reprint-an-old-order flow benefits from the eyeballing step.DailyReportPayload now exposes totalLineDiscount + totalOrderDiscount alongside the combined totalDiscount (kept for callers that want one number, e.g. Telegram daily — though it doesn't currently consume this).metric-discount testid removed; new metric-discount-line + metric-discount-order testids added.npx tsc --noEmit); /cafe/products /pos /orders /reports/daily all 307 cleanly; receipt-preview-local re-runs 10/10 with banner assertions updated.nix-cafe:
app/(authed)/pos/starter-register-client.tsx — banner skips modal: imports
KhmerReceipt + openPrintWindow,
hidden receipt mount, handlePrint
fires iframe print directly
lib/db/orders.ts — DailyReportPayload split,
aggregateNativeDailyReport returns
totalLineDiscount + totalOrderDiscount
+ (combined) totalDiscount
app/(authed)/reports/daily/starter-daily-client.tsx — Avg Ticket card shows two lines
tests:
test-cafe-followups-local.mjs — NEW (this bundle)
test-receipt-preview-local.mjs — banner assertion flipped to
direct-print expectation
1. Commit nix-cafe (single -m line) — only nix-cafe touched, no backend, no migrations.
2. Push → CF Pages auto-redeploys cafe Worker.
3. Update test-receipt-preview-prod.mjs to expect direct-print on banner (modal flow on /orders only).
4. Run new test-cafe-followups-prod.mjs against get-coffee:
- Ring 1 product, pay → success banner shows Print
- Click Print → openPrintWindow iframe spawned, NO preview modal opens
- On /orders, click Print → preview modal still opens (regression)
- Seed an order with both line + order discount, visit /reports/daily, assert
metric-discount-line + metric-discount-order render with the right values
5. Regression sweep: receipt-preview + round 3 + round 2 + round 1 + R2.4b + 70.2 + phase1.
6. Publish prod gallery + ask for final approval.