Skip to content

DOM-ACC-CLS-004Close Record

Markdown

DOM-ACC-CLS-004

Close Record

Markdown
  • DocumentDraft
  • ImplementationObserved

Planning

Specified by
CON-ACC-CLS-004

Design

Owned by
SVC-ACC-CLS-fiscal-close

KindDomain objectProduct areaAccountingModuleMonth-End ClosingRevision1

Read atservices-accounting f47cb263react-console baf6dae3

Relationships

ToCardinalityOwnershipCrosses a serviceOn archive or delete
DOM-ACC-CLS-003one snapshot to one successful close runThe snapshot belongs to its run and restricts deletion of that run until the snapshot is removed.no
DOM-ACC-CLS-002one captured evaluationThe snapshot retains its own copy of the close’s evaluation.no
DOM-ACC-CLS-001one closed month refers to the close request that retains its snapshotThe period links to the close run; the snapshot repeats that run’s period under a composite foreign key.no

Invariants

InvariantProtectsEnforced atProvenance
INV-DOM-ACC-CLS-004-01
The snapshot key permits at most one snapshot for a close run.
databasetest
INV-DOM-ACC-CLS-004-02
The snapshot’s composite reference requires its period to match its run.
databasetest
services-accounting:modules/fiscal-close/tests/integration/db/fiscal-close.table.integration.spec.js#refuses a snapshot that names a period other than its run’s, by the run’s foreign key
INV-DOM-ACC-CLS-004-03
The database roles have no permission to update a captured snapshot.
databasetest
services-accounting:modules/fiscal-close/tests/integration/db/fiscal-close.table.integration.spec.js#refuses the application role any update of a snapshot, which is written once
INV-DOM-ACC-CLS-004-04
Every snapshot document is a JSON object stored in fewer than 512 kilobytes.
databasetest
INV-DOM-ACC-CLS-004-05
The normal finalization path writes the snapshot, closes the period and succeeds the run in one transaction; a failed transaction leaves no snapshot.
service, databasetest
INV-DOM-ACC-CLS-004-06
The database refuses deletion of a run still referenced by a snapshot.
databasetest
INV-DOM-ACC-CLS-004-07
The record operation requires a close-kind run and its snapshot; a reopen or close without a snapshot is not found.
serviceobserved
INV-DOM-ACC-CLS-004-08
Reopening preserves the earlier snapshot and exposes the linked reopen through the record read.
service, databasetest
INV-DOM-ACC-CLS-004-09
The purge callback deletes snapshots, job roots and runs before calendar records, restricting deletion to the selected workspace.
database, servicetest

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.