Skip to content

feat(finance): aging buckets + cash/bank balance (#100 backend)#104

Merged
ankitsejwal merged 1 commit into
mainfrom
feat/m3.5-dashboard
Jul 16, 2026
Merged

feat(finance): aging buckets + cash/bank balance (#100 backend)#104
ankitsejwal merged 1 commit into
mainfrom
feat/m3.5-dashboard

Conversation

@ankitsejwal

Copy link
Copy Markdown
Member

M3.5 · Task #100 — dashboard data (backend)

Backend for the admin finance dashboard. Tiles + income-vs-expense chart render in the consolidated M3.5 admin-UI pass; this PR ships the data + the aging report.

  • Aging buckets (shared): agingBucketFor + bucketAging — 0-30 / 31-60 / 61-90 / 90+ days past due. Not-yet-due counts as current; cleared/credit balances skipped.
  • API GET /reports/aging?asOf= — buckets per-bill outstanding dues, total and per flat (sorted by exposure) for the defaulter report.
  • /reports/finance now returns cashBankBalance (Σ over ledger 10xx accounts) for the cash+bank tile; FinanceReport type + finance-shape test updated.

Acceptance

  • ✅ Defaulter report groups outstanding into 30/60/90/90+ aging buckets (endpoint + pure helper).
  • ⏳ Dashboard tiles (outstanding total + collection rate + cash/bank) and the income-vs-expense chart → M3.5 admin-UI pass (reuse /reports/finance, /bills/dues, /reports/aging; React-idiomatic, no direct DOM).

Tests

Aging bucket boundaries + summation + not-yet-due/cleared handling; /aging route (auth + a two-flat bucketing case). Suite 366 green, web typechecks. No schema change.

Backend for the admin finance dashboard (tiles + charts land in the M3.5
admin-UI pass).

- shared: agingBucketFor + bucketAging (0-30 / 31-60 / 61-90 / 90+ days past
  due; not-yet-due counts current, cleared balances skipped) + AGING_BUCKETS.
- API GET /reports/aging?asOf= — buckets outstanding per-bill dues, total and
  per flat (sorted by exposure), for the defaulter report.
- /reports/finance now also returns cashBankBalance (ledger 10xx accounts) for
  the dashboard tile; FinanceReport type + the finance-shape test updated.
- Tests: aging bucket boundaries + summation + not-yet-due/cleared handling;
  /aging route (auth + a two-flat bucketing case). Suite 366 green; web
  typechecks.
@ankitsejwal
ankitsejwal merged commit 8b76831 into main Jul 16, 2026
1 check passed
@ankitsejwal
ankitsejwal deleted the feat/m3.5-dashboard branch July 16, 2026 13:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant