1.6 KiB
1.6 KiB
F-190 — Reporting updates from POS sales and returns
Fix reporting capture and refresh so POS sales payments returns pending and completed states update reports.
Scope
- POS sales (POST /pos/sales) already emit
reporting_payment_linesrows on payment — these are verified to capture correctly. - POS returns (POST /pos/sales/:id/returns) already emit
reporting_payment_lineswith status=refund/partial_refund— these are verified to capture correctly. - PENDING-payment sales (F-188) when they transition to COMPLETED must emit a payment line to
reporting_payment_linesso the report shows the sale. - Orders in
PARTIALLY_REFUNDEDandREFUNDEDmust reflect the updated totals inreporting_payment_lines. - A refresh mechanism for
reporting_payment_linesfor a given order_id exists (for correction scenarios) — or a clear note that manual correction is required. - Any gaps in
expected_cash_centscalculation for returns are verified and fixed.
Out of scope
- Ecommerce or admin order refunds.
- Automatic reconciliation of discrepancies (manual correction only).
Acceptance
- A PENDING sale that transitions to COMPLETED emits exactly one
reporting_payment_linesrow with the correct amount and status. - A fully-returned sale shows a
refundpayment line in reporting with negative amount. - A partially-returned sale shows a
partial_refundpayment line in reporting with the partial amount. - Reporting summary totals match the sum of
reporting_payment_linesfor the date range. verify.shgreen, typecheck green, all tests pass.