Skip to content

CAP-ACC-BAT-007Place documents in eligible batches and protect posted work

Markdown

CAP-ACC-BAT-007

Place documents in eligible batches and protect posted work

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
Issued documents enter eligible collections and posted documents retain intake protection.
Surfaces
consoleapi
Constraints
Transactions owns document issuance, amendment and voiding; batch intake and posting protection are the concern here.
Intent sources
services-accounting:docs/architecture/accounting-2.0/02-decisions.md#A-4services-accounting:docs/architecture/accounting-2.0/02-decisions.md#A-6services-accounting:docs/architecture/accounting-2.0/02-decisions.md#A-7services-accounting:docs/architecture/accounting-2.0/02-decisions.md#A-14

Controls

23 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-002 TC-PI-003 TC-PI-005

Permissions

KeyChecked atScope
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
Document intake accepts only an Open or Error transaction batch belonging to the document’s business unit and refuses an ineligible batch.
validationservicetest
services-accounting:modules/batches/tests/integration/services/close/system-batch-guard.integration.spec.js#refuses an invoice, a credit memo and a write-off naming the system batch (a transaction batch only, batch_not_open)
02must prove
Proposed
The API can place documents in an Error batch, while the console picker restricts its choices to Open batches.
policyservice, consoleobserved
03must prove
Proposed
Draft and pro forma invoices remain outside batches.
invariantdatabase, servicetest
04must prove
Proposed
The database prevents moving a document into or out of a Posting, Posted or Downloaded batch.
invariantdatabasetest
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)
05must prove
Proposed
Before posting, staff can reassign a document between eligible Open batches of its unit, with batch-update permission required by the console.
policyservice, consoletest
06must prove
Proposed
Posted batches reject new allocations, and an allocation without a batch is refused when its payment is posted and assignment provides no replacement.
invariantdatabase, servicetest
services-accounting:modules/batches/tests/integration/services/posting/rebuilt-payments.integration.spec.js#refuses, in the database, an allocation row into the posted batch (RHA05)
07must prove
Proposed
Posted invoices, memos, payments and credits reject voiding and require an eligible correction document or controlled unposting instead.
lifecycleservicetest
services-accounting:modules/batches/tests/integration/services/posting/gl-resolution-at-posting.integration.spec.js#refuses voiding an invoice of a posted batch (batch_not_open), the invoice unchanged
08must prove
Proposed
An issued invoice may be amended before posting subject to amendment and applied-money safeguards, while Posting and Posted batches reject that amendment.
lifecycleservice, databasetest
09must prove
Proposed
The recorded product decision permits date correction only before posting and keeps issued money, customer and payment method immutable.
invariantdocumented
10must prove
Proposed
Documents without an explicit batch use their unit’s assignment and must satisfy the same batch-intake checks.
policyservicetest

Scenarios

IdGivenWhenThenProvenance
01An invoice belongs to an Open receivables batch.Staff move it to another Open batch of the unit and post that target.The invoice posts with its target batch and cannot subsequently leave it.test
02An invoice belongs to a Posted batch.Staff request a void.The batch restriction refuses the void, leaving correction to an eligible memo or unposting workflow.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.