What a Journal Row Carries
The Actions
Fourteen action types exist, and no other way to change financial state.- Documents
- Payments
- Links and Approval
- Reserves
Notice what is not in the list: there is no action for amending an invoice’s
line items, and none for changing its type. Those are not restricted operations —
they are operations that do not exist. This is the mechanism behind the rule in
Invoices: type and line items are fixed at creation.
An Invoice Is Its Journal, Folded
To know an invoice’s current state, the engine reads every journal row for that invoice in sequence order and folds them into a single picture — its line items, its status, what has been paid, whether it is approved. The fold is the authority. Every precondition check runs against it, never against the convenience copy in the read tier.1
An action arrives
A payment is recorded against invoice INV-000412-001.
2
The invoice is locked and its journal folded
The engine replays the invoice’s existing rows to establish what it is right
now — is it voided, is it already fully paid, does the cited line item exist.
3
Preconditions run against that fold
A payment on a voided invoice is refused here. The refusal is based on
replayed history, so it cannot be fooled by a stale cache.
4
The row is appended, then the ledger and read tier follow
Only once the action is admitted does anything get written — the journal row,
its balanced ledger batch, and the updated projection, all in one
transaction.
