feat(reports): sales summary, transaction report and finance exports (#38 slice 1) #109
No reviewers
Labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
primatekuntech/kws!109
Loading…
Reference in a new issue
No description provided.
Delete branch "feat/38-reporting"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Slice 1 of #38 (reporting). Issue stays open for slices 2 and 3.
What
GET /v1/admin/reports/sales-summary(day/week/month buckets, per-currency totals, per-park net, waived/collected)GET /v1/admin/reports/transactions(keyset paging) and/transactions/export(XLSX)GET /v1/admin/reports/finance/daily-sales/export(XLSX: lines + summary sheet)reports.view; finance export needsfinance.manage). Read-only RepeatableRead snapshots with statement timeouts, no locks.= + - @ TAB CRare quote-prefixed.Rules worth a look
Africa/Nairobicalendar day, computed in SQL; no zone declared in Go (ADR 0022).grand_totalon the day ofcompleted_at; neverpurchase_price. Per currency, no KES conversion.quantity * unit_sub_total(checkout stores it after promo). The plan text said minus discount; that was wrong and a test pins it.refund_amountsums refund_due + refunded payments in the sale's currency only.Verification
make cover): 90.9% total (minimum 80%).make lint0 issues,make contractok,go test -race ./...ok.Owner follow-ups ([verify])
YYYY/0MM(July start), D/C = C for wallet, payment reference = Daraja CheckoutRequestID, hand-written XLSX writer acceptable.internal/kenyatimeconsolidation of six FixedZone copies is a separate follow-up.🤖 Generated with Claude Code