feat: organization wallet reads and partner sales report (#53, PR B) #162
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!162
Loading…
Reference in a new issue
No description provided.
Delete branch "feat/partner-reports-53"
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?
Summary
Issue #53, PR B: the organization's wallet reads and its sales report (API only; the web pages are PR C).
GET /v1/orgs/{id}/walletsandGET .../wallets/{wallet_id}/entries(ewallet.view): balances per currency and the statement, newest first, each line with the invoice code of the sale behind it. Another organization's wallet is a 404; the operation key is never returned.GET /v1/orgs/{id}/reports/sales(reports.sales.view, max 2000 rows, else 422) and.../export(reports.sales.export, XLSX, max 100,000 rows,heavyclass, two at a time per node): completed itinerary sales of the organization on Nairobi days, filters currency / itinerary / literal search, totals per currency (gross, refunded, net), never converted. A sale is flagged refunded only when its own payment was refunded.acquireSlot/sendWorkbookwith the new handler.Review
Dual pass (ponytail complexity: no Must-fix; correctness: one Important). Fixed test-first: an extra payment refunded on its own flagged the whole sale as refunded; invalid-UTF-8/NUL search was a 500, now 422. Deferred minors (duplication of the wallet JSON/paging code,
likeEscaperfourth copy, and similar) are listed in the ledger.Coverage
make cover: total 91.4% (minimum 80%).make lint: 0 issues.Owner [verify]
defaultrate class; only the export isheavy.🤖 Generated with Claude Code