The forecast was counting money twice: operating used asset accounts while
reserve used equity accounts, but both sides of the opening balance journal
entry represent the same funds. Changed all cash balance queries (current,
opening, and historical) to use asset accounts (debit - credit) for both
operating and reserve. Also fixed a LEFT JOIN bug where date filters on
journal_entries didn't prevent journal_entry_lines from being summed,
causing opening balances to include all entries regardless of date.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
New feature: Cash Flow page under Financials showing stacked area chart of
operating/reserve cash and investment balances over time. Backend forecast
endpoint integrates assessment income schedules, budget expenses, capital
project costs, and investment maturities to project 24+ months forward.
Historical months show actual journal entry balances; future months are
projected. Includes Operating/Reserve/All fund filter, 12-month sliding
window navigation, forecast reference line, and monthly detail table.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Investment accounts now appear under their respective Operating/Reserve
tabs in the Accounts page, with a compact sub-table showing name, type,
institution, principal/value, rate, interest earned, and maturity info
- Investment values (current_value) are included in dashboard Total Cash KPI
- Reserve investment values are added to Reserve Fund Balance KPI and
project funded percentage calculations
- Year-end report reserve status now includes reserve investment values
- Tab counts updated to include investment accounts per fund type
- Summary cards show separate "asset (investments)" total for visibility
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Dashboard reserve fund KPI now uses reserve equity accounts (fund balance
position) instead of asset accounts, correctly showing the total reserve
fund balance regardless of how users categorize their reserve accounts
- Projects findAll() and findForPlanning() dynamically compute funded_percentage
and current_fund_balance from reserve equity account balances via CTE,
distributing the total reserve balance proportionally across projects
- Year-end summary reserve status now queries unified projects table instead
of deprecated reserve_components table
- Remove standalone Monthly Assessment field from Units form — assessment
amount is now inherited from the selected assessment group
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Root cause: multiple issues with balance computation across the system.
Accounts list:
- findAll() was doing SELECT * FROM accounts, returning the stale
denormalized `balance` column (always 0). Now computes balances from
journal entries using proper double-entry logic (debit-credit for
assets/expenses, credit-debit for liabilities/equity/income).
Dashboard KPIs:
- Total Cash filtered by name LIKE '%Cash%' which missed accounts not
named "Cash". Now queries ALL asset accounts regardless of name.
- Reserve Fund queried the legacy reserve_components.current_fund_balance
column. Now computes from journal entries on reserve asset accounts.
Opening balance journal entries:
- On blank tenants, equity offset accounts (3000/3100) don't exist, so
the balancing journal entry line was silently skipped, leaving entries
unbalanced. Now auto-creates Operating Fund Balance (3000) and Reserve
Fund Balance (3100) equity accounts when needed.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Rename app from "HOA Financial Platform" to "HOA LedgerIQ" across all
frontend pages, backend API docs, package.json files, and seed data
- Add Cash Flow Statement report (GET /reports/cash-flow) with operating
and reserve fund activity breakdown, beginning/ending cash balances
- Add Aging Report (GET /reports/aging) with per-unit aging buckets
(current, 1-30, 31-60, 61-90, 90+ days), expandable invoice details
- Add Year-End Package (GET /reports/year-end) with income statement
summary, collection stats, 1099-NEC vendor report, reserve fund status
- Add Settings page showing org info, user profile, and system details
- Replace all PlaceholderPage references with real implementations
- Bump auth store version to 3 for localStorage migration
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>