---
id: ADR-ACC-TRX-002
title: Database Maintenance of Ledger Balances
product_area: accounting
module: transactions
revision: 1
status: proposed
design_intent: confirmed
source_sha:
  services-accounting: f47cb263875bbc0c5640fba7dae6785ec32695f8
  react-console: baf6dae382d6f41dce976c7f848667ccc37e076f
decision: >-
  The recorded integrity direction uses retained financial ledgers,
  database-maintained bounded balances and minor-unit money, with atomic command
  effects and explicit exceptions for asynchronous work and aging
  representation.
constrains:
  - DOM-ACC-TRX-001
  - DOM-ACC-TRX-003
  - DOM-ACC-TRX-004
  - DOM-ACC-TRX-006
  - SVC-ACC-TRX-transactions
  - WF-ACC-TRX-005
  - WF-ACC-TRX-003
origin: >-
  Andrew’s D-01 (rebuild on the integrity design: allocation ledgers, generated
  balances, frozen documents) and D-04 (minor units), 2026-10-17:
  services-accounting:docs/architecture/accounting-2.0/02-decisions.md#1. The
  assessment's decisions, D-01 to D-07 (Andrew, 2026-10-17)
alternatives:
  - option: Maintain financial balances in application updates.
    why_not: >-
      Independent balance calculation can diverge from the entries that explain
      the money.
  - option: Replace or remove a mistaken ledger entry.
    why_not: >-
      That approach would erase the original movement rather than record its
      correction.
consequences:
  - >-
    Database bounds reject excess applications after competing commands
    serialize.
  - The application role does not directly update maintained financial amounts.
  - >-
    Agreement of receivable facts with the posting control balance and Commerce
    position view remains unproved.
  - >-
    Aging still uses major-unit amounts, a recorded implementation departure
    from the minor-unit direction.
supersedes: []
evidence:
  - >-
    services-accounting at f47cb263:
    docs/architecture/accounting-2.0/02-decisions.md, 05-lifecycles.md,
    06-integrity-model.md.
---
# Database Maintenance of Ledger Balances

## Context

The rebuild’s integrity model is intended to make retained movements explain the financial position. Its approved representation direction remains distinct from implementation departures.

## Decision

The structured decision records the governing boundary and its observed limits. Its origin distinguishes Andrew’s rulings from reversible implementation choices and proposed publication policy.

## Alternatives Considered

The listed alternatives explain the competing responsibility or recovery approaches and why the recorded direction differs. They are explanatory comparisons, without evidence of a separate approval discussion for each alternative.

## Consequences

The consequence rows identify implementation obligations, current departures and gaps requiring further verification. Artifact status remains proposed until Andrew approves it.
