Skip to content

CAP-ACC-BAT-003Correct batch details before posting

Markdown

CAP-ACC-BAT-003

Correct batch details before posting

Markdown
  • DocumentDraft
  • Product intentProposed
  • ImplementationObserved

KindCapabilityProduct areaAccountingModuleBatch ManagementRevision1

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
Eligible corrections retain collection identity and recalculate affected fiscal placement.
Surfaces
consoleapi
Intent sources
services-accounting:docs/migrations/transaction-processing/batches/README.md#Status as actions (job tp-batch-lifecycle, Andrew's UI brief of 2026-10-15)services-accounting:docs/migrations/transaction-processing/batches/README.md#D14 and migration 0060 (Andrew, 2026-10-16)

Controls

22 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-TEN-004 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.batches.updateapitenant
accounting.batches.updateconsoletenant

Business Rules

10 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
Details edits accept name, code, description, date, type, currency, automatic close, external reference and lock, while rejecting status changes through that editor.
origin: services-accounting:docs/migrations/transaction-processing/batches/README.md#Status as actions (Andrew's UI brief of 2026-10-15)
validationapiobserved
02must prove
Proposed
Neither the owning business unit nor the originating recurring-batch reference can be reassigned.
invariantapi, service, databaseobserved
03must prove
Proposed
Posted, downloaded and archived batches reject ordinary field corrections but permit a request that changes only their lock.
lifecycleserviceobserved
04must prove
Proposed
A batch currently posting rejects field changes until more than five minutes have passed since its last change.
lifecycleserviceobserved
05must prove
Proposed
Changing the date recalculates the fiscal period and rejects entry into a non-open period, while an edit that stays within its period does not require that period to remain open.
calculationservicetest
services-accounting:modules/batches/tests/integration/services/persistence/batches.integration.spec.js#refuses moving an open batch’s date into a closed period (journey 0516/0520 setups: the rule stands)
06must prove
Proposed
Renaming cannot take a name already held by another batch in the same unit.
origin: services-accounting:docs/migrations/transaction-processing/batches/README.md#D14 and migration 0060 (Andrew, 2026-10-16)
validationservice, databasetest
services-accounting:modules/batches/tests/integration/services/persistence/batches.integration.spec.js#refuses a rename to a name another batch of the unit has 409, name_in_use (D14)
07must prove
Proposed
A supplied stale version prevents a details save, although the details API allows the version to be omitted.
validationserviceobserved
08must prove
Proposed
An update lock blocks ordinary edits, and a caller with update permission can release it only in a separate request containing no other changes.
policyservicetest
09must prove
Proposed
An ordinary batch cannot be changed into a period-close system type.
policyservicetest
services-accounting:modules/batches/tests/integration/services/close/system-batch-guard.integration.spec.js#refuses changing an ordinary batch’s type to a system type, the batch unchanged
10must prove
Proposed
Update permission controls details editing, and the console marks Edit Details unavailable with an explanation for a caller lacking it.
permissionapi, consoletest

Scenarios

IdGivenWhenThenProvenance
01A versioned editor is open when another caller closes and archives the batch.The editor saves against the earlier version.The stale save is refused, and a reloaded ordinary edit is also refused by archive protection.documented
02An October batch has already posted.A caller changes its date to early November.The refused edit preserves the batch date and fiscal period.test
services-accounting:modules/batches/tests/integration/services/persistence/batches.integration.spec.js#refuses moving the date of a posted batch, and the batch keeps its date and fiscal period (DEF-ACT-0502)

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.