Skip to content

ATS-ACC-BAT-016Unpost a batch for correction and replacement posting: Capability Test Specification

Markdown

ATS-ACC-BAT-016

Unpost a batch for correction and replacement posting: Capability Test Specification

Markdown
  • DocumentProposed
  • Product intentProposed

KindAcceptance test setProduct areaAccountingModuleBatch ManagementRevision2

Read atservices-accounting f47cb263react-console baf6dae3rhythm-v2-docs 37405d50

Unpost a batch for correction and replacement posting: Capability Test Specification ​

Coverage ​

The scenarios define focused checks for this outcome. The coverage map distinguishes specified checks from unresolved proof; executable bindings identify inspected assertions and carry no execution result.

Recovery changes dependent lookup. Unpost restores ordinary actions. Recovery permits document reassignment. Reposting creates a fresh generation. Guarded recovery removes only its ledger. Recovery leaves history without ordinary entries. Fiscal close blocks ordinary recovery. These checks use the related capability’s outcome as part of the setup or verification. Unbound interactions remain proposed until a suite executes the complete chain.

Coverage

  • Rule covered
  • Transition gap: FND-ACC-BAT-070
  • Validation covered
  • Permission gap: FND-ACC-BAT-070
  • Edge covered
  • Failure covered
  • Boundary gap: FND-ACC-BAT-070
  • Concurrency covered
  • Invariant covered
  • Interaction covered

Test Scenarios

15 scenarios proving CAP-ACC-BAT-016; 8 bound to an existing test.

01 Recovery access and state are checkedpermissionbrowsernegativetest
Proves
BR-CAP-ACC-BAT-016-01 BR-CAP-ACC-BAT-016-02
Preconditions
Staff and administrator personas can inspect a Posted and an Open batch.
Steps
Unpost Posted as staff and Open as administrator.
Expected
Staff receive 403 without changing Posted; the invalid state returns 409.
Data
Provide the acceptance personas.
Bound to
Source
services-accounting:modules/batches/tests/e2e/batch-postings.e2e.spec.js#refuses an unposting without the unposting permission, 403, and leaves the batch posted
02 Ordinary unposting deletes ledger rowstransitionbrowsertest
Proves
BR-CAP-ACC-BAT-016-03 BR-CAP-ACC-BAT-016-04 BR-CAP-ACC-BAT-016-05 BR-CAP-ACC-BAT-016-06 INV-DOM-ACC-BAT-003-05 INV-DOM-ACC-BAT-005-04
Preconditions
Two batches are Posted and the first contains deferred revenue.
Steps
Unpost the first and inspect all ledger history, posting history, schedules and the second batch.
Expected
The first has no entries or reversal entries, retains a reversed posting record, voids open schedules and becomes Open without posting time; the second is unchanged.
Data
Provide the acceptance workspace.
Bound to
Source
services-accounting:modules/batches/tests/integration/services/posting/unpost-deletes-entries.integration.spec.js#deletes the batch’s entries and their lines, and tells how many entries
03 Posted dependents block isolated recoveryinvariantapinegativetest
Proves
BR-CAP-ACC-BAT-016-07
Preconditions
Posted November depends on Posted October.
Steps
Unpost October alone.
Expected
The dependency refusal leaves October Posted.
Data
Provide two dependent batches.
Bound to
Source
services-accounting:modules/batches/tests/integration/services/posting/rebuilt-documents.integration.spec.js#refuses to unpost October while November, which depends on it, is posted
04 Closed periods block recoveryvalidationapinegativetest
Proves
BR-CAP-ACC-BAT-016-08
Preconditions
September’s posted batch remains after period close.
Steps
Request Unpost through the action and job paths.
Expected
The action creates no job and identifies the closed period; the job fails its check and leaves Posted unchanged.
Data
Provide a fiscal close.
Bound to
Source
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
05 Reposting writes a fresh current setruleapitest
Proves
BR-CAP-ACC-BAT-016-09
Preconditions
The batch was posted and then unposted.
Steps
Post again and inspect ledger history.
Expected
A new posting owns one fresh set of entries without old rows or compensating reversals.
Data
Provide no fixtures beyond the stated setup.
Bound to
Source
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
06 Guarded deletion preserves failed workfailureapinegativetest
Proves
BR-CAP-ACC-BAT-016-10
Preconditions
One posting’s deletion will fail; others hold reversals or are already reversed.
Steps
Unpost the first and directly attempt the other guarded deletions, including from another workspace.
Expected
The failed job preserves posting, entries and batch; invalid direct deletions return the guarded database error.
Data
Provide refusing fixtures.
Bound to
Source
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
07 Locks and system type restrict unpostingedgeapinegativetest
Proves
BR-CAP-ACC-BAT-016-11
Preconditions
A posted ordinary batch is locked and a fiscal system batch is Posted.
Steps
Attempt actions and job submissions for both.
Expected
The action reports the lock; the system job refuses recovery and leaves its batch Posted.
Data
Provide a fiscal close.
Bound to
Source
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
08 Recovery changes dependent lookupinteractionapiproposed
Proves
BR-CAP-ACC-BAT-002-07 BR-CAP-ACC-BAT-016-06
Preconditions
October has a Posted November dependent.
Steps
Look up October’s dependents, recover November, then repeat the lookup.
Expected
November appears before recovery and is absent from the posted-dependent result afterward.
Data
An isolated workspace with the stated business-unit calendar, documents and configuration.
Source
services-accounting:modules/batches/tests/integration/services/persistence/batches.queries.integration.spec.js#answers the posted and downloaded batches depending on those named, through others, with their id, name, date and status; 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
09 Unpost restores ordinary actionsinteractionapiproposed
Proves
BR-CAP-ACC-BAT-004-06 BR-CAP-ACC-BAT-016-06
Preconditions
Morning is Posted in an Open period.
Steps
Unpost through the named action and retrieve the resulting action catalogue.
Expected
Morning is Open and offers Close and Archive again.
Data
An isolated workspace with the stated business-unit calendar, documents and configuration.
Source
services-accounting:modules/batches/tests/unit/actions/batch-actions.spec.js#offers a batch posting for half an hour nothing, and one stuck in posting for over an hour unpost; 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
10 Recovery permits document reassignmentinteractionapiproposed
Proves
BR-CAP-ACC-BAT-007-05 BR-CAP-ACC-BAT-016-06
Preconditions
Morning is Posted with one invoice and Evening is Open in the same unit.
Steps
Unpost Morning and move its invoice to Evening.
Expected
Morning is Open without ledger entries and the invoice names Evening.
Data
An isolated workspace with the stated business-unit calendar, documents and configuration.
Source
react-console:acceptance/accounting/playwright/journeys/batches-posting/ACT-ACC-0538.spec.ts#ACT-ACC-0538; 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
11 Reposting creates a fresh generationinteractionapiproposed
Proves
BR-CAP-ACC-BAT-013-04 BR-CAP-ACC-BAT-016-09
Preconditions
Morning contains one invoice and its fiscal period remains Open.
Steps
Post, recover and post Morning again; inspect all posting history and current entries.
Expected
Two posting generations remain, the first reversed, with only the second generation’s entries current.
Data
An isolated workspace with the stated business-unit calendar, documents and configuration.
Source
services-accounting:modules/batches/tests/integration/services/jobs/submission-identity.integration.spec.js#answers a colleague's retry under another key, after the posting finished, with the job that posted (DEF-ACT-0514); 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
12 Guarded recovery removes only its ledgerinteractionapiproposed
Proves
BR-CAP-ACC-BAT-016-03 BR-CAP-ACC-BAT-017-04
Preconditions
Morning and Evening each have a current posting in an Open period.
Steps
Unpost Morning and list both batches’ entries including history.
Expected
Morning has no entries; Evening’s stored entries are unchanged.
Data
An isolated workspace with the stated business-unit calendar, documents and configuration.
Source
services-accounting:modules/batches/tests/integration/services/posting/unpost-deletes-entries.integration.spec.js#deletes the batch’s entries and their lines, and tells how many entries; services-accounting:modules/batches/tests/integration/services/posting/unpost-deletes-entries.integration.spec.js#is the only way to delete a ledger row: the application role is refused a direct delete
13 Recovery leaves history without ordinary entriesinteractionapiproposed
Proves
BR-CAP-ACC-BAT-016-03 BR-CAP-ACC-BAT-018-04
Preconditions
Morning is Posted and has a visible ledger entry.
Steps
Unpost Morning and list its entries with and without history.
Expected
Both entry lists are empty while posting history retains the retired generation.
Data
An isolated workspace with the stated business-unit calendar, documents and configuration.
Source
services-accounting:modules/batches/tests/integration/services/posting/unpost-deletes-entries.integration.spec.js#deletes the batch’s entries and their lines, and tells how many entries; services-accounting:modules/batches/tests/integration/services/persistence/subledger-entries.queries.integration.spec.js#lists no entry when history is asked for either: nothing is written as a reversal
14 Fiscal close blocks ordinary recoveryinteractionapinegativeproposed
Proves
BR-CAP-ACC-BAT-016-08 BR-CAP-ACC-BAT-020-11
Preconditions
A posted ordinary batch belongs to a Closed period with a system batch.
Steps
Attempt ordinary recovery and inspect both the ordinary and system accounting.
Expected
Recovery is refused; both postings and their entries stay intact.
Data
An isolated workspace with the stated business-unit calendar, documents and configuration.
Source
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; react-console:acceptance/accounting/playwright/journeys/batches-posting/ACT-ACC-0528.spec.ts#ACT-ACC-0528
15 Recovery waits for a competing batch lockconcurrencyapinegativetest
Proves
BR-CAP-ACC-BAT-016-02 BR-CAP-ACC-BAT-016-10
Preconditions
A Posted batch has a current posting; another database transaction holds its row and changes it to Open.
Steps
Start direct unposting, confirm lock waiting, then commit the competing change.
Expected
Recovery waits and refuses the Open state; its original posting remains unreversed.
Data
Owned records in an isolated workspace with the stated calendar and accounting setup.
Bound to
Source
services-accounting:modules/batches/tests/integration/services/posting/concurrent-posting.integration.spec.js#makes a direct unposting wait for the batch, then refuse it as open, with its posting left unreversed

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.