Finfry::Database
Inherits JSON::Serializable < Reference < Object
The full persisted state: an id counter, all transactions, per-account monthly budget limits (cents), the declared chart of accounts, the unknown-account policy, and the undo journal.
Constructors
Brand-new ledger only — seeds the starter chart. from_json does not call this, so deserialized ledgers keep whatever chart they had (or none).
Instance methods
Free-form per-account metadata (account => key => value), e.g. a credit card's apr/limit/due-day. Visible to the AI; secrets are a later feature.
Free-form per-account metadata (account => key => value), e.g. a credit card's apr/limit/due-day. Visible to the AI; secrets are a later feature.
Explicitly declared accounts (the chart). Empty by default so existing ledgers loaded via from_json aren't reseeded.
Explicitly declared accounts (the chart). Empty by default so existing ledgers loaded via from_json aren't reseeded.
Undo journal — one entry per mutating operation, newest last.
Reconciliation, two-tier. cleared is the staged tier — transactions
toggled cleared during a session, still editable (account => [ids]).
reconciled is the committed tier — transactions locked in by a finished,
statement-balanced reconciliation; they drop off the working list.
Reconciliation, two-tier. cleared is the staged tier — transactions
toggled cleared during a session, still editable (account => [ids]).
reconciled is the committed tier — transactions locked in by a finished,
statement-balanced reconciliation; they drop off the working list.
The due queue (generated occurrences awaiting review) + its id counter.
Audit trail of finalized reconciliations, newest last.
The last change removed by undo, available for redo until the next
mutation invalidates it.
The last change removed by undo, available for redo until the next
mutation invalidates it.