Skip to content

CAP-ACC-REC-009Allocate settlement money to one explanation

Markdown

CAP-ACC-REC-009

Allocate settlement money to one explanation

Markdown
  • DocumentDraft
  • Product intentConfirmed
  • ImplementationObserved

KindCapabilityProduct areaAccountingModuleReconciliationRevision2

Read atservices-accounting f47cb263react-console baf6dae3

The Formal Contract

The narrative above explains; the sections below are authoritative — the rules, scenarios and tests this document binds.

Outcomes
Allocations prevent two explanations from using one effect.Committed holdings determine the difference.Version checks protect concurrent preparation.
Surfaces
consoleapi
Intent sources
services-accounting:docs/milestones/plans/ACCT-M8-plan.md#D10 (§2: claims, releases, concurrency by version)services-accounting:docs/milestones/plans/ACCT-M8-plan.md#D6 (architecture §3.4 U2, U3, U7)services-accounting:docs/milestones/plans/ACCT-M8-plan.md#D10 (§4: the architecture §6 invariants hold; INV-02, INV-05, INV-07, INV-19)

Controls

20 controls apply, from the corpus control catalogue.

TC-IAM-001 TC-IAM-002 TC-IAM-004 TC-IAM-005 TC-AZ-001 TC-AZ-002 TC-AZ-003 TC-AZ-004 TC-AZ-006 TC-TEN-001 TC-TEN-002 TC-TEN-003 TC-DAT-001 TC-LOG-002 TC-LOG-003 TC-LOG-004 TC-LOG-005 TC-PI-001 TC-PI-003 TC-PI-005

Permissions

KeyChecked atScope
accounting.reconciliation-batches.updateapitenant
accounting.reconciliation-batches.updateconsoletenant

Business Rules

11 rules, 10 to be proved before approval. A rule's product intent is derived from its origin: 11 confirmed by a product decision, the rest inheriting this capability's confirmed.

IdRuleKindEnforced atProvenance
01must prove
Confirmed
A claim uses the read version and one to five hundred item references, reporting all ineligible, resolved, incompatible or already-held-here items together.
origin: services-accounting:docs/milestones/plans/ACCT-M8-plan.md#D10 (plan approved 2026-10-22 10:40 ET; §2 scope)
validationapi, servicetest
02must prove
Confirmed
An item has only one active claim across draft and finalized reconciliations; competing attempts yield one winner and identify the existing holder and preparer to the other.
origin: services-accounting:docs/milestones/plans/ACCT-M8-plan.md#D10 (§4: the architecture §6 invariants hold; INV-05)
invariantservice, databasetest
03must prove
Confirmed
Difference equals claimed money minus payout money in integer minor units, yielding Draft with no claims, In Progress with a nonzero difference and Balanced with a zero difference while open.
✓ 43 items of 10,000.00 against 9,725.00 read +275.00, in progress.✗ A balanced reconciliation is not finalized.
calculationservice, databasetest
services-accounting:modules/reconciliation/tests/integration/db/reconciliation-batches.table.integration.spec.js#generates the difference as claimed items less payouts, the brief’s sign; services-accounting:modules/reconciliation/tests/unit/rules/batch-status.spec.js#is a draft with nothing claimed, whatever its difference; services-accounting:modules/reconciliation/tests/unit/rules/batch-status.spec.js#is in progress with a claim and a difference short of zero; services-accounting:modules/reconciliation/tests/unit/rules/batch-status.spec.js#is balanced with a claim and a difference of exactly zero; services-accounting:modules/reconciliation/tests/integration/services/reconciliation-batches/brief-example.integration.spec.js#is in progress once the 42 captures and the refund are claimed, 27500 over the payout
04must prove
Confirmed
Claims preserve matching strength, explanation, source batch and claimant; each claim or release operation advances version once and writes audit history.
lifecycleservicetest
05must prove
Confirmed
Release removes money from current totals but keeps the claim with release time, actor and reason, freeing the item for reuse; manual entries use removal instead.
origin: services-accounting:docs/milestones/plans/ACCT-M8-plan.md#D10 (plan approved 2026-10-22 10:40 ET; §2 scope)
lifecycleservice, databasetest
06must prove
Confirmed
Authoritative acceptance claims the processor-linked payout-reference and settlement-grouping candidates together; repeating it with no new candidate preserves the version.
origin: services-accounting:docs/milestones/plans/ACCT-M8-plan.md#D6 (architecture §3.4 U3: Accept All covers authoritative matches only)
policyservicetest
07must prove
Confirmed
Claims change only an open reconciliation at its current version; stale edits fail.
origin: services-accounting:docs/milestones/plans/ACCT-M8-plan.md#D10 (§4: the architecture §6 invariants hold; INV-08)
validationservice, databasetest
08must prove
Confirmed
A claim covers the complete item and preserves one unit, merchant and currency between item and reconciliation.
origin: services-accounting:docs/milestones/plans/ACCT-M8-plan.md#D10 (§4: the architecture §6 invariants hold; INV-02)
invariantdatabasetest
09must prove
Confirmed
A reconciliation cannot contain more than ten thousand claims.
origin: services-accounting:docs/milestones/plans/ACCT-M8-plan.md#D10 (§4: the architecture §6 invariants hold; INV-19)
invariantdatabasetest
10must prove
Confirmed
Update permission governs claim, release and authoritative acceptance; read-only callers cannot use them.
permissionapitest
11
Confirmed
Save Draft sends only differences from the persisted draft, processing releases and removals before new claims and manual entries.
policyconsoletest
react-console:lib/accounting/reconciliation/adapter.test.ts#releases and removes before it claims and adds, and sends only what differs

Scenarios

IdGivenWhenThenProvenance
01The sample draft has forty-three candidates totaling ten thousand dollars.Claim those effects.Difference is positive two hundred seventy-five dollars and status is In Progress.test
services-accounting:modules/reconciliation/tests/e2e/reconciliation-scenario.e2e.spec.js#step 5: claims the 43 items, 27500 over the payout (claimed − payout, INV-07)
02Two captures carry the deposit’s processor reference.Accept authoritative matches.Both receive the strongest matching rank and balance the explanation.test
services-accounting:modules/reconciliation/tests/e2e/reconciliation-matching.e2e.spec.js#claims the two captures carrying PX-1083 at tier 1, balancing RB-10001

Edge Cases

IdGivenWhenThenProvenance
03Two open drafts compete for one settlement item.Claim concurrently.One allocation succeeds and the other reports its holder.test

The Markdown files under specs/ in rhythmsoftware/rhythm-v2-docs are the canonical source of truth. This reader is a generated, read-only projection of them.