Accounting page — period-aware Overview dashboard tiles (collapsible)
Why¶
The Accounting page's three "stat cards" (Accounts / Journal Entries / Posted Entries) were vanity counts the owner didn't find useful. They wanted period- aware, decision-useful tiles governed by the global Period selector (T-058), and the cards made collapsible.
What shipped (origin/nightly d2ea5425)¶
New components/accounting/AccountingOverview.tsx replacing the 3 cards. Five
tiles, all governed by useAccountingPeriod() (the single period source):
- Cash position — Σ balance of GL asset accounts whose
linkedBankAccountis set, summed from the Balance Sheetassets[]as of the period end. Robust signal (the seed COA links 1000/1001/… → ERL-DSB-*), NOT a GL-code-range guess. - Net · {period} —
pnl.data.netIncome(+ revenue / expenses sub-line), green/red by sign. - Receivables —
ar.data.summary.total(+['90+']overdue in red). - To review — unmatched + partial bank-tx count from
useTransactionStats(intentionally a GLOBAL inbox metric, not period-scoped). Clicking deep-links to the Bank Transactions tab pre-filtered to unmatched. -
Months closed — closed / total months in the selected period, with a progress bar (fetches
/api/accounting/periods, counts viamonthsInRange). -
Consumes the SAME report query results the page already fetched (pnl/bs/ar are passed in as props — no second fetch). Single source of truth.
- Collapsible; state persisted to
localStorage(eop.accounting.overviewCollapsed). Default expanded (these tiles are useful, unlike the old vanity cards). - Deep-link wiring:
BankTransactionsTabgained a controlled Status-columnfilteredValue(synced via the tableonChange) + areviewSignalprop; the tile bumps the signal andsetActiveTab("transactions"), pre-filtering to unmatched and clearing the date range so every unmatched tx shows.
Verification¶
tsc + lint clean (new file lint-clean; edits added zero new errors). Full suite 325/325. Couldn't browser-verify — the Accounting page is auth-gated, so the local preview can't reach it; eyeball on the nightly preview (p-eop).
Related¶
T-058 (period selector this builds on), T-060 (table column widths, same owner request).