Skip to content

CAP-ACC-REC-007Explain partial or unrecoverable settlement money

Markdown

CAP-ACC-REC-007

Explain partial or unrecoverable settlement money

Markdown
  • DocumentDraft
  • Product intentProposed
  • 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
Partial settlement can be explained across separate deposits.Write-off records unrecoverable money and its accounting consequence.
Surfaces
api
Intent sources
services-accounting:docs/milestones/plans/ACCT-M8-plan.md#D10 (§4: the architecture §6 invariants hold; architecture §12.3 resolved states and §16.3 entry E8)

Controls

23 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-005 TC-AZ-006 TC-TEN-001 TC-TEN-002 TC-TEN-003 TC-DAT-001 TC-LOG-001 TC-LOG-002 TC-LOG-003 TC-LOG-004 TC-LOG-005 TC-PI-001 TC-PI-002 TC-PI-003 TC-PI-005

Permissions

KeyChecked atScope
accounting.settlement-items.resolveapitenant

Business Rules

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

IdRuleKindEnforced atProvenance
01must prove
Proposed
Splitting uses the read version and a request key to create at least two same-sign parts whose amounts exactly equal the original.
✓ 250.00 split into 200.00 and 50.00.✗ 250.00 split into 200.00 and 49.99 is refused.
validationapi, service, databasetest
02must prove
Proposed
Only unresolved and unclaimed items can be split or resolved; a claimed item’s refusal identifies its reconciliation.
policyservicetest
03must prove
Proposed
Split marks the original resolved, records the approving person and creates parts retaining the parent’s context and evidence with individual amounts and parent links.
lifecycleservice, databasetest
04must prove
Proposed
Split and write-off close an open overdue exception on the original item.
lifecycleservicetest
05must prove
Proposed
Item resolution records a reason and chooses either write-off or another explained resolution.
validationapitest
services-accounting:modules/reconciliation/tests/e2e/outstanding.e2e.spec.js#refuses a resolution outside the vocabulary with 400; services-accounting:modules/reconciliation/tests/integration/services/persistence/settlement-items.integration.spec.js#writes off an item with its entry: Dr the write-off account, Cr the merchant clearing account, in the unit’s batch on its date; services-accounting:modules/reconciliation/tests/integration/services/persistence/settlement-items.integration.spec.js#mirrors the entry of a negative item: Dr the clearing account, Cr the write-off account; services-accounting:modules/reconciliation/tests/integration/services/persistence/settlement-items.integration.spec.js#dates the request on the November batch’s date, the resolution date its document date
06must prove
Proposed
Write-off creates a request debiting settlement write-off and crediting merchant clearing for a positive item, reversing those sides for a negative item, dated on the selected open batch with the resolution day retained separately.
calculationservicetest
services-accounting:modules/reconciliation/tests/integration/services/persistence/settlement-items.integration.spec.js#writes off an item with its entry: Dr the write-off account, Cr the merchant clearing account, in the unit’s batch on its date; services-accounting:modules/reconciliation/tests/integration/services/persistence/settlement-items.integration.spec.js#mirrors the entry of a negative item: Dr the clearing account, Cr the write-off account; services-accounting:modules/reconciliation/tests/integration/services/persistence/settlement-items.integration.spec.js#dates the request on the November batch’s date, the resolution date its document date; services-accounting:modules/reconciliation/tests/e2e/outstanding.e2e.spec.js#refuses a resolution outside the vocabulary with 400; react-console:acceptance/accounting/playwright/journeys/reconciliation-close/ACT-ACC-0603.spec.ts#ACT-ACC-0603
07must prove
Proposed
Write-off leaves the item unresolved when the write-off account or an accepting operational batch in an open period is missing.
validationservicetest
08must prove
Proposed
An explained resolution other than write-off creates no ledger request.
policyservicetest
09must prove
Proposed
Split and resolution keys replay identical requests, reject changed bodies and distinguish the operations even when their key text matches.
origin: services-accounting:docs/milestones/plans/ACCT-M8-plan.md#D10 (§2: idempotency of every money command)
validationapi, servicetest
services-accounting:modules/reconciliation/tests/integration/services/persistence/settlement-items.integration.spec.js#keys a request per operation: the same key on a split is a request of its own; services-accounting:modules/reconciliation/tests/e2e/outstanding.e2e.spec.js#refuses a principal without accounting.settlement-items.resolve with 403; services-accounting:modules/reconciliation/tests/e2e/outstanding.e2e.spec.js#answers the same request under the same key with the first answer; services-accounting:modules/reconciliation/tests/e2e/outstanding.e2e.spec.js#refuses the same key with another request with 409 idempotency_key_reused; services-accounting:modules/reconciliation/tests/e2e/outstanding.e2e.spec.js#refuses a split without an Idempotency-Key with 400 idempotency_key_required
10must prove
Proposed
The sensitive administrator resolve permission governs both splitting and item resolution.
permissionapitest
services-accounting:modules/reconciliation/tests/e2e/outstanding.e2e.spec.js#refuses a principal without accounting.settlement-items.resolve with 403; services-accounting:modules/reconciliation/tests/e2e/outstanding.e2e.spec.js#answers the same request under the same key with the first answer; services-accounting:modules/reconciliation/tests/e2e/outstanding.e2e.spec.js#refuses the same key with another request with 409 idempotency_key_reused; services-accounting:modules/reconciliation/tests/e2e/outstanding.e2e.spec.js#refuses a split without an Idempotency-Key with 400 idempotency_key_required; services-accounting:modules/reconciliation/tests/integration/services/persistence/settlement-items.integration.spec.js#keys a request per operation: the same key on a split is a request of its own
11
Proposed
The console currently exposes neither splitting nor write-off.
policyconsoleobserved

Scenarios

IdGivenWhenThenProvenance
01Only two hundred dollars of a two-hundred-fifty-dollar capture arrived.Split into arrived money and the fifty-dollar remainder.The original becomes resolved as split and both same-context parts replace it.test
services-accounting:modules/reconciliation/tests/e2e/outstanding.e2e.spec.js#answers the two parts with their amounts and source keys <parent>:split:<n>
02The unit’s write-off account is configured.Write off the overdue item.Resolution creates a clearing-to-write-off accounting request.test
services-accounting:modules/reconciliation/tests/e2e/outstanding.e2e.spec.js#writes the request settlement-item:<id>:write-off in beta’s batch, debiting the write-off account and crediting the clearing account

Edge Cases

IdGivenWhenThenProvenance
03The only operational batch is dated in a closed October.Attempt write-off.No accepting open-period batch exists, so the item remains unresolved.test
services-accounting:modules/reconciliation/tests/integration/services/persistence/settlement-items.integration.spec.js#refuses the write-off while the unit’s batch is dated in the closed October (400, `no_open_batch`)

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.