Skip to content

CAP-ACC-TRX-018Preserve and read monthly receivables aging

Markdown

CAP-ACC-TRX-018

Preserve and read monthly receivables aging

Markdown
  • DocumentDraft
  • Product intentProposed
  • ImplementationObserved

KindCapabilityProduct areaAccountingModuleTransactionsRevision1

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
Finance reviews a stable month-end position with a clear publication version.Readers receive only published data and restart paging after a version change. Staff rerun controls remain a delivery gap.
Surfaces
consoleapijob
Intent sources
services-accounting:docs/snapshots/ar-aging.md#The A/R Aging Snapshot (`accounting.ar_aging`)

Controls

28 controls apply, from the corpus control catalogue.

TC-IAM-001 TC-IAM-002 TC-IAM-004 TC-IAM-005 TC-IAM-006 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-DAT-002 TC-DAT-003 TC-LOG-004 TC-AVL-001 TC-AVL-004 TC-MON-001 TC-MON-002 TC-MON-004 TC-PI-001 TC-PI-002 TC-PI-004 TC-PI-005 TC-PRV-001 TC-PRV-002

Permissions

KeyChecked atScope
accounting.ar-aging.readapitenant
accounting.ar-snapshot-items.queryservicetenant
accounting.ar-snapshot-totals.queryservicetenant

Business Rules

8 rules, 7 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
After a month closes in the workspace calendar, scheduled planning creates its first snapshot version once for each eligible workspace.
origin: services-accounting:docs/snapshots/ar-aging.md#The A/R Aging Snapshot (`accounting.ar_aging`)
lifecycleservicetest
services-accounting:modules/transactions/tests/integration/services/runs/ar-aging-pipeline.integration.spec.js#it plans nothing twice: a second pass creates no run, and the ledger holds one run per tenant
02must prove
Proposed
Capture records month-end debt and negative unapplied money as known at that cutoff, excluding later-recorded backdated transactions.
origin: services-accounting:docs/snapshots/ar-aging.md#The A/R Aging Snapshot (`accounting.ar_aging`)
calculationservice, databasetest
services-accounting:modules/transactions/tests/integration/services/runs/ar-aging-pipeline.integration.spec.js#it captures the open items as known at September’s end: the back-dated check recorded on 5 October is not in it
03must prove
Proposed
Snapshot items retain document and customer labels and classify debt into current, thirty-day bands through one hundred and twenty days, then older debt, with a separate unapplied bucket.
origin: services-accounting:docs/snapshots/ar-aging.md#The A/R Aging Snapshot (`accounting.ar_aging`)
calculationservicetest
services-accounting:modules/transactions/tests/integration/services/runs/ar-aging-pipeline.integration.spec.js#it copies each item’s number, its business unit and currency, and the customer’s name from CRM
04must prove
Proposed
Publication requires successful validation and reconciled totals; failed capture rolls back its rows and schedules another attempt.
origin: services-accounting:docs/snapshots/ar-aging.md#The A/R Aging Snapshot (`accounting.ar_aging`)
invariantservicetest
services-accounting:modules/transactions/tests/integration/services/runs/ar-aging-pipeline.integration.spec.js#it leaves none of the failed run’s rows behind: its transaction rolled back
05must prove
Proposed
Published data remains immutable; rerunning creates a new current version on publication while preserving superseded rows by run.
origin: services-accounting:docs/snapshots/ar-aging.md#The A/R Aging Snapshot (`accounting.ar_aging`)
invariantdatabase, servicetest
06must prove
Proposed
Month reads expose published data only, explain unavailable runs and reject a cursor when newer publication would mix versions.
origin: services-accounting:docs/snapshots/ar-aging.md#The A/R Aging Snapshot (`accounting.ar_aging`)
policyapi, servicetest
services-accounting:modules/transactions/tests/e2e/ar-aging.e2e.spec.js#it refuses the first version’s cursor with 409 version_changed, rather than continuing in the second version
07must prove
Proposed
Aging and dataset reads require their corresponding authorities and isolate workspace records.
origin: services-accounting:docs/snapshots/ar-aging.md#The A/R Aging Snapshot (`accounting.ar_aging`)
permissionapi, databasetest
services-accounting:modules/transactions/tests/e2e/ar-aging.e2e.spec.js#it refuses a principal holding only the application’s access with 403 permission_missing
08
Proposed
Credit applications reduce both invoice and credit open items on their date rather than creating a third item; reversal restores both on its own date.
origin: services-accounting:docs/snapshots/ar-aging.md#The A/R Aging Snapshot (`accounting.ar_aging`)
calculationservicetest

Scenarios

IdGivenWhenThenProvenance
01A September-dated check was first recorded on October fifth.Capture September, then request a reconstructed version.The first version excludes information unknown at cutoff; the later version includes it and replaces the current publication.test
services-accounting:modules/transactions/tests/integration/services/runs/ar-aging-pipeline.integration.spec.js#it includes the back-dated check recorded after the period end: the invoice it paid is 70.00
02One workspace contains an incorrectly classified aging item.Run its monthly capture alongside other workspaces.Validation fails and rolls back that capture, schedules retry and leaves independent publications unaffected.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.