Skip to content

CAP-ACC-BAT-016Unpost a batch for correction and replacement posting

Markdown

CAP-ACC-BAT-016

Unpost a batch for correction and replacement posting

Markdown
  • DocumentDraft
  • Product intentProposed
  • ImplementationObserved

KindCapabilityProduct areaAccountingModuleBatch ManagementRevision1

Read atservices-accounting f47cb263react-console baf6dae3

Unpost a batch for correction and replacement posting ​

Purpose ​

Administrators reopen posted work for correction while retaining the record of the earlier posting.

How It Works ​

An administrator chooses Unpost and confirms the accounting removal. The action or job checks the batch, fiscal period and dependent work. The current ordinary posting’s ledger entries are then removed within the transaction. Its posting record and job history remain available. Staff can correct or reassign the reopened documents before posting again. A guarded-deletion refusal leaves the prior accounting intact and fails the job.

Relationships ​

  • Prerequisite: Run and monitor a batch posting job, which addresses the connected batch work.
  • Related outcome: Place documents in eligible batches and protect posted work, which addresses the connected batch work.
  • Related outcome: Protect ledger balance, immutability and workspace isolation, which addresses the connected batch work.
  • Related outcome: Post and reverse fiscal-close system batches, which addresses the connected batch work.

The Formal Contract

The narrative above explains; the sections below are authoritative — the rules, scenarios and tests this document binds.

Outcomes
Eligible ordinary recovery removes the current ledger result while preserving posting history.
Surfaces
consoleapijob
Constraints
Fiscal reopening retains a separate system-batch reversal path.
Intent sources
services-accounting:docs/accounting/batches.md#Unposting deletes the entries (Andrew, Reporting D7, 2026-10-21)services-accounting:docs/architecture/accounting-2.0/02-decisions.md#A-4

Controls

25 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-005 TC-AZ-006 TC-TEN-001 TC-TEN-002 TC-TEN-003 TC-CRY-004 TC-DAT-001 TC-DAT-004 TC-LOG-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.batch-postings.unpostapitenant

Business Rules

11 rules, 11 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
Unposting needs the administrator unposting permission, which the ordinary posting staff tier does not grant.
permissionapi, consoletest
services-accounting:modules/batches/tests/e2e/batch-postings.e2e.spec.js#refuses an unposting without the unposting permission, 403, and leaves the batch posted
02must prove
Proposed
Unpost admits Posted, Downloaded and posting work unchanged for more than one hour.
lifecycleservicetest
services-accounting:modules/batches/tests/e2e/batch-actions.e2e.spec.js#refuses unposting a batch that is not posted 409
03must prove
Proposed
Ordinary unposting deletes the current posting’s entries and lines without creating reversals or removing another batch’s entries.
origin: services-accounting:docs/accounting/batches.md#Unposting deletes the entries (Andrew, Reporting D7, 2026-10-21)
lifecycleservice, databasetest
04must prove
Proposed
The posting remains marked reversed with the unposting time and job, and retained job history preserves who acted and when.
origin: services-accounting:docs/accounting/batches.md#Unposting deletes the entries (Andrew, Reporting D7, 2026-10-21)
invariantservicetest
05must prove
Proposed
Unposting voids the posting’s open revenue-recognition schedules.
origin: services-accounting:docs/accounting/batches.md#Unposting deletes the entries (Andrew, Reporting D7, 2026-10-21)
lifecycleservicetest
06must prove
Proposed
The batch returns to Open with posting time, statistics and dependents cleared so its documents can be corrected or reassigned.
origin: services-accounting:docs/accounting/batches.md#Unposting deletes the entries (Andrew, Reporting D7, 2026-10-21)
lifecycleservicetest
services-accounting:modules/batches/tests/e2e/batch-postings.e2e.spec.js#unposts a posted batch as a durable job: the batch is open again and its entries are deleted
07must prove
Proposed
A Posted or Downloaded dependent prevents unposting unless that dependent is included in the same unposting request.
invariantserviceobserved
08must prove
Proposed
Unposting is refused outside an Open fiscal period.
validationservicetest
services-accounting:modules/batches/tests/integration/services/close/posting-period-guard.integration.spec.js#refuses the batch action `unpost` (`period_not_open`), submitting no job
09must prove
Proposed
Reposting creates a fresh current posting and entry set and writes fresh line snapshots.
origin: services-accounting:docs/accounting/batches.md#Unposting deletes the entries (Andrew, Reporting D7, 2026-10-21)
lifecycleservicetest
services-accounting:modules/batches/tests/integration/services/posting/unpost-deletes-entries.integration.spec.js#writes one fresh set when the batch is posted again, equal in size to the first
10must prove
Proposed
A refused guarded deletion preserves batch, posting and entries and fails the job, and rejects postings already reversed, containing reversal entries or belonging to another workspace.
invariantservice, databasetest
services-accounting:modules/batches/tests/integration/services/posting/unpost-refusal.integration.spec.js#keeps the posting, its entries and the batch as they were, and fails the unposting step with the refusal
11must prove
Proposed
Update-locked and system batches reject ordinary unposting through either actions or jobs.
policyservicetest
services-accounting:modules/batches/tests/e2e/system-batches.e2e.spec.js#answers an unposting naming the system batch with its job, and the job fails with the refusal

Scenarios

IdGivenWhenThenProvenance
01A posted rehearsal batch contains an invoice assigned to the wrong stream.An administrator unposts, reassigns the invoice and posts the corrected batch.The ordinary entries disappear on unposting and one fresh set represents the later posting.documented
02A staff caller has posting permission but no unposting permission.The caller inspects a Posted batch and requests Unpost.The console omits the unauthorized action and the API refusal preserves the posting.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.