feat(reports): finance pax and revenue by gate export (#38) #114
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!114
Loading…
Reference in a new issue
No description provided.
Delete branch "feat/38-gate-pax-revenue"
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?
What
Finance reports PR C of #38 slice 2: pax and revenue by gate, replacing legacy QR Report and Revenue Report.
GET /v1/admin/reports/finance/gate-pax-revenue/export?from&to[&park_id&gate_id¤cy](admin_portal.finance.manage, platform scope only; max 366 days; two at a time per node; at most 100,000 grouped rows, counted first, 422 above).Pax and Revenue: long form, one row per Nairobi check-in day, park, gate, currency and product, withPax(checked-in tickets) andRevenue(sum ofpurchase_price, net of discount, before tax and fee); product name, short form, resident type, activity type. SheetSummary: pax and revenue per currency, and per currency and park.tickets.code. No migration.exportGatePaxRevenueReport+ live contract test; ADR 0023 and CLAUDE.md updated.Owner defaults (research defaults; all [verify] in ADR 0023)
Check-in-day basis (legacy used the UTC sale day), long form instead of one column per product,
finance.manageonly, no exchange-rate or KES columns. Vehicle rows do not exist: vehicle tickets cannot be checked in (ADR 0019), and legacy's vehicle columns were always empty. Rows are ordered by park and gate name (codes can be NULL).Verification
make cover: 91.0% total (minimum 80%);make lint0 issues;make contractok;go test -race ./...ok; client generation ran.20:59:59Z/21:00:00Z; tests for top-up counted once, check-out not counted, masters excluded, currencies separate, free and waived, filters, too-many-rows.Review
Dual-pass. Pass 1 (ponytail): Must fix none; Should-fix items skipped (shared summary-sum helper across three handlers, the
""sentinel key, a second aggregate for the group count). Pass 2 (correctness): 0 Critical; Important (docs said waived sales count 0, the code counts their ticket price) and minors fixed in04fbc4e, including keying the per-park Summary by park id so two same-named parks (a soft-deleted one and a live one) cannot merge. Pass 1 re-check of the fix: Must fix none.Known gaps
🤖 Generated with Claude Code