The engine only had life-of-ledger P&L and balance sheet totals, so every export labeled with a date range or as-of date (PDF, XLSX, CPA package) printed all-time numbers under that label. Core now has: - profit_and_loss_for_period(start, end, class?) and balance_sheet_as_of(as_of), each with a line per account (StatementLine: code, name, normal-side amount) and exact totals. - Ledger::closing_entry_ids(). Period statements exclude closing entries. A close (Dr revenue / Cr expense / net to Retained Earnings, dated at period end) moves earnings; it doesn't earn or spend. Counting it made a closed period's P&L read as break-even, and made the cash flow show zero net income plus a fake "owner contribution" to Retained Earnings. The as-of balance sheet keeps closing entries: after a close the earnings belong in Retained Earnings, not current earnings. Tests: tests/statements.rs, a two-month fixture with every expected number computed by hand (Jan NI 1,700; Feb 880; balance sheets on four dates; a closed January still reporting 1,700 and a cash flow with one financing line). Mutation-checked: dropping the closing exclusion fails it (0 vs 1,700). Properties: period P&Ls partition a year at any split, and a range's net income equals the change in current earnings across it, with A = L + E on both dates. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01MtYEaR6M6Ybdhm6X98BWNu
54 lines
3.5 KiB
Markdown
54 lines
3.5 KiB
Markdown
# Parity catalog
|
|
|
|
Every semantic feature we intend to clone, with its status. Updated in the
|
|
same commit as the feature. **The floor never decreases**: the count of
|
|
`done` items is monotonic across commits.
|
|
|
|
Statuses: `done` = implemented + invariant-tested + golden-covered.
|
|
`partial` = implemented but missing tests or goldens. `todo` = not started.
|
|
No other statuses.
|
|
|
|
**Floor: 10 done** (2026-10-10; fixed-asset register added).
|
|
|
|
| Area | GnuCash reference | Status | Notes |
|
|
|---|---|---|---|
|
|
| Chart of accounts (5 types, codes, hierarchy) | Accounts tab | done | `account.rs`; placeholder support in |
|
|
| Double-entry validation (balanced, ≥2 lines) | Journal validation | done | `journal.rs::validate` |
|
|
| Exact decimal money, no floats | — (we go further) | done | `money.rs`; Currency ISO codes |
|
|
| Posted-entry immutability | Read-only posted txns | done | reversal via `reverse_entry` |
|
|
| Trial balance | Reports → Trial Balance | done | golden-covered |
|
|
| Balance sheet (A = L + E) | Reports → Balance Sheet | done | current earnings folded in pre-close; golden-covered |
|
|
| Profit & loss | Reports → Income Statement | done | golden-covered |
|
|
| P&L for a date range, line per account (closing entries excluded) | Reports → Income Statement (custom dates) | partial | hand-verified fixture + property tests; no golden file yet |
|
|
| Balance sheet as of a date, line per account | Reports → Balance Sheet (as of) | partial | hand-verified fixture + property tests; no golden file yet |
|
|
| Reversing entries | Reverse transaction | done | linked via `reversal_of` |
|
|
| Canonical report snapshots (JSON) | — (our oracle format) | done | `reports::snapshot` |
|
|
| Fixed-asset register + straight-line depreciation | Fixed Asset register | done | `assets.rs`; golden-covered schedule; idempotent runs; disposal with gain/loss |
|
|
| Cash flow statement (indirect) | Reports → Cash Flow | done | R-FUTURE-3 |
|
|
| Period close / retained earnings | Close books | todo | R-FUTURE-2 |
|
|
| Foreign-currency lines (base + foreign stored) | Multi-currency accts | done | R-FUTURE-1 |
|
|
| Period close (closing entry to Retained Earnings) | Close books | done | R-FUTURE-2 |
|
|
| Bank reconciliation (cleared flags + report) | Reconcile | done | — |
|
|
| QuickBooks CSV import (bank txns, chart of accounts) | Banking → Upload | done | R-FUTURE-4 |
|
|
| QuickBooks IIF + XLSX export | Export / reports | done | R-FUTURE-4 |
|
|
| A/R invoices + payments + aging | Business → Invoices | done | R-FUTURE-5 |
|
|
| A/P bills + payments + aging | Business → Bills | done | R-FUTURE-5 |
|
|
| Payroll runs (accounting only, no tax tables) + tax remittance | Payroll | done | — |
|
|
| Tracking classes (divisional P&L) | Class tracking | done | — |
|
|
| CPA handoff package (TB + GL xlsx, P&L + BS pdf, zip) | Reports → export | done | — |
|
|
| Budgets | Budgets | todo | R-FUTURE-6 (declined as bloat) |
|
|
| Scheduled transactions | Scheduled txns | todo | R-FUTURE-6 |
|
|
| Automated GnuCash diff harness | — (our `xtask oracle`) | todo | roadmap phase 3 |
|
|
|
|
Workflow/UI parity (QuickBooks/Xero reference) gets its own catalog when the
|
|
egui phase starts; semantics come first.
|
|
|
|
## Capability parity (AI-first phase)
|
|
|
|
Semantic parity (above) is about *correctness*: the engine computes the
|
|
right numbers. Capability parity is about *usefulness*: can the new system
|
|
do everything the GSheet+GDrive system does today? Tracked separately in
|
|
`docs/capability-parity.md`, with its own cutover rule (parallel run +
|
|
Stephen's approval). The two catalogs converge: when both are green, the
|
|
sheet retires.
|