Skip to content

DOM-ACC-BAT-001Batch

Markdown

DOM-ACC-BAT-001

Batch

Markdown
  • DocumentDraft
  • ImplementationObserved

Planning

Specified by
CON-ACC-BAT-001

Design

Owned by
SVC-ACC-BAT-batches

KindDomain objectProduct areaAccountingModuleBatch ManagementRevision1

Read atservices-accounting f47cb263react-console baf6dae3

Relationships

ToCardinalityOwnershipCrosses a serviceOn archive or delete
DOM-ACC-BAT-003one-to-manyThe batch is the parent of its posting history, with at most one current generation.no
DOM-ACC-BAT-004one-to-manyLedger entries are owned by postings and reference the batch for fiscal placement.no
DOM-ACC-BAT-005one-to-manyRevenue plans are posting children reached through the batch posting history.no

Invariants

InvariantProtectsEnforced atProvenance
INV-DOM-ACC-BAT-001-01
Batch names cannot repeat within a business unit.
service, databasetest
services-accounting:modules/batches/tests/integration/services/persistence/batches.integration.spec.js#refuses a name another batch of the unit has 409, name_in_use, in 1.0’s sentence (D14)
INV-DOM-ACC-BAT-001-02
Creation fixes the batch business unit and originating stream; neither can subsequently be replaced.
api, service, databaseobserved
INV-DOM-ACC-BAT-001-03
Ordinary batch creation and editing calculate fiscal placement from the date in the business unit calendar.
servicetest
INV-DOM-ACC-BAT-001-04
A batch reference on a document, allocation or posting must identify a batch in the referencing record business unit.
databaseobserved
services-accounting:modules/batches/db/batches.table.ts:batches_business_unit_id_uq (the same-unit composite target)
INV-DOM-ACC-BAT-001-05
The database prevents document batch reassignment into or out of Posting, Posted and Downloaded batches and prevents allocation intake into posted batches.
databasetest
services-accounting:modules/batches/tests/integration/services/posting/rebuilt-documents.integration.spec.js#refuses, in the database, moving a document out of a posted batch (RHA05)
INV-DOM-ACC-BAT-001-06
Deletion fails while a document, posting or entry retains a restrictive reference to the batch.
database, servicetest
services-accounting:modules/batches/tests/integration/services/persistence/batches.integration.spec.js#answers 409 naming the batch for every table whose restrict foreign key names a batch, never a 500 (DEF-ACT-0012)
INV-DOM-ACC-BAT-001-07
Fiscal accounting exclusively manages system batches; ordinary modification, lifecycle actions and deletion reject them.
serviceobserved
INV-DOM-ACC-BAT-001-08
Redelivery of the same stream occurrence cannot create a second batch for that occurrence.
service, databasetest
services-accounting:modules/batches/tests/integration/services/roll/batch-roller.integration.spec.js#opens nothing for the same occurrence delivered again, and answers the same batch
INV-DOM-ACC-BAT-001-09
Stream unit and schedule identity cannot change, and schedule validation rejects rolls more frequent than once per day.
service, databasetest
services-accounting:modules/batches/tests/e2e/recurring-batches.e2e.spec.js#answers 400 to a schedule that would run more often than once a day
INV-DOM-ACC-BAT-001-10
Routing references must stay within their business unit; a rule cannot combine merchant-account and bank-account criteria.
api, service, databasetest
services-accounting:modules/batches/tests/e2e/batch-assignment-settings.e2e.spec.js#answers 400 naming bank_account_id to a rule naming both a merchant and a bank account
INV-DOM-ACC-BAT-001-11
A recurring stream cannot be removed while routing references it or generated batches remain, except for the unused current batch removed with it.
service, databasetest
services-accounting:modules/batches/tests/e2e/recurring-batches.e2e.spec.js#answers 409 naming the settings and how they name it
INV-DOM-ACC-BAT-001-12
A read in one workspace cannot retrieve a batch belonging to a different workspace.
database, apitest

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.