Maintain stock balances through movement and allocation ledgers
Context
Concurrent promises and physical movements need balances backed by retained facts.
Decision
Maintain stock balances through movement and allocation triggers and derive available stock in the database.
Alternatives Considered
Permit direct service balance writes alongside ledger entries. Independent balance writes can diverge from the ledgers that explain them.
Derive all availability from ledgers on each read. Claims need current constrained balances while their transaction runs.
Consequences
Opening imports and corrections use ledger movements. Reconciliation can rederive balances without silently assigning replacements.