Skip to content

ATS-ACC-CLS-003Protect periods from ordinary postings during close: Capability Test Specification

Markdown

ATS-ACC-CLS-003

Protect periods from ordinary postings during close: Capability Test Specification

Markdown
  • DocumentProposed

KindAcceptance test setProduct areaAccountingModuleMonth-End ClosingRevision1

Read atservices-accounting f47cb263react-console baf6dae3

Coverage

  • Rule gap: FND-ACC-CLS-059
  • Transition covered
  • Validation gap: FND-ACC-CLS-059
  • Permission not-applicable
  • Edge covered
  • Failure gap: FND-ACC-CLS-059
  • Boundary gap: FND-ACC-CLS-059
  • Concurrency covered
  • Invariant covered
  • Interaction covered

Test Scenarios

7 scenarios proving CAP-ACC-CLS-003; 5 bound to an existing test.

01 Refuse protected batch creation and carry reconciliation forwardinteractionapinegativetest
Proves
BR-CAP-ACC-CLS-003-03
Preconditions
A run retains one month and the following month is open.
Steps
Attempt batch creation dated in the retained month and finalize reconciliation for that month.
Expected
Batch creation is refused and reconciliation uses the following month’s first day with a late marker.
Data
A retained close and following open period.
Bound to
services-accounting:modules/fiscal-close/tests/integration/services/jobs/close-concurrency.integration.spec.js#posts a reconciliation dated in it on the first open period, October 1, flagged late after close
Source
services-accounting:modules/fiscal-close/tests/integration/services/jobs/close-concurrency.integration.spec.js#posting into a closing period
02 Permit close-owned posting and its reopen reversalinteractionapitest
Proves
BR-CAP-ACC-CLS-003-02
Preconditions
Scheduled revenue is due.
Steps
Complete the close and then reopen.
Expected
Recognition posts under the closing exception and reversal uses the reopening exception.
Data
A due recognition schedule.
Bound to
services-accounting:modules/fiscal-close/tests/integration/services/jobs/revenue-recognition.integration.spec.js#reverses the close’s posting by its event key, the batch open again with no count or total
Source
services-accounting:modules/fiscal-close/tests/integration/services/jobs/revenue-recognition.integration.spec.js#revenue recognition in the close and reopen jobs (integration)
03 Refuse late effects without an open destinationedgeapinegativeproposed
Proves
BR-CAP-ACC-CLS-003-04 BR-CAP-ACC-CLS-003-01
Preconditions
All generated periods are closed.
Steps
Attempt late reconciliation finalization and protected batch actions.
Expected
No eligible late destination exists and protected actions return refusals.
Data
A fully closed generated calendar.
Source
services-accounting:modules/reconciliation/services/close-readiness/assess-period.ts:assertPeriodWritable,services-accounting:modules/batches/services/posting-period-guard.ts:POSTING_PERIOD_RULES
04 Serialize posting and closingconcurrencyapitest
Proves
BR-CAP-ACC-CLS-003-05 INV-DOM-ACC-CLS-001-09
Preconditions
A posting transaction holds the period’s shared row lock.
Steps
Invoke close finalization from another connection and then release the holder.
Expected
Finalization waits and completes only after the shared lock is released.
Data
Separate holder and close database connections.
Bound to
Source
services-accounting:modules/fiscal-close/tests/integration/services/jobs/close-concurrency.integration.spec.js#finalize and a transaction holding the period FOR SHARE
05 Refuse invalid and stale state changestransitionunitnegativetest
Proves
BR-CAP-ACC-CLS-003-06 BR-CAP-ACC-CLS-003-07 INV-DOM-ACC-CLS-001-03
Preconditions
Periods are available in each state.
Steps
Attempt all transitions and repeat an expected-state update after another writer moves the period.
Expected
Only permitted transitions succeed and the stale writer is refused.
Data
Period-state fixtures and two competing updates.
Bound to
services-accounting:modules/fiscal-close/tests/unit/rules/transitions.spec.js#may make exactly the six moves of a close and a reopen
services-accounting:modules/fiscal-close/tests/unit/rules/transitions.spec.js#is refused every other move between two statuses, by name
services-accounting:modules/fiscal-close/tests/integration/services/persistence/fiscal-periods.integration.spec.js#refuses the second of two writers that read the period open, once the first has moved it
Source
services-accounting:modules/fiscal-close/tests/unit/rules/transitions.spec.js#fiscal close transitions
06 Keep financial exceptions inside the closing boundaryinteractionapiproposed
Proves
BR-CAP-ACC-CLS-003-01 BR-CAP-ACC-CLS-003-02 BR-CAP-ACC-CLS-003-03 BR-CAP-ACC-CLS-003-05
Preconditions
Due revenue and late reconciliation effects belong to an ended month with a following open month.
Steps
Take the month for closing; try ordinary batch work, complete recognition, finalize late reconciliation and finish the close.
Expected
Close-owned work uses its permitted state window while late effects reach the following month; ordinary work does not bypass the protected boundary.
Data
Due revenue and late reconciliation effects belong to an ended month with a following open month.
Source
rhythm-v2-docs:specs/accounting/close/design/workflows/WF-ACC-CLS-006-keep-ordinary-postings-out-of-a-protected-month.md#What It Does,services-accounting:modules/fiscal-close/tests/integration/services/jobs/close-concurrency.integration.spec.js#refuses a batch dated in the closing period,services-accounting:modules/batches/services/posting-period-guard.ts:POSTING_PERIOD_RULES,services-accounting:modules/fiscal-close/tests/integration/services/jobs/close-concurrency.integration.spec.js#posts a reconciliation dated in it on the first open period, October 1, flagged late after close,services-accounting:modules/fiscal-close/tests/integration/services/jobs/close-concurrency.integration.spec.js#waits on the period row while the FOR SHARE is held
07 Refuse an unknown period stateinvariantapinegativetest
Proves
INV-DOM-ACC-CLS-001-01
Preconditions
A generated period is available under its database constraints.
Steps
Attempt to write a period state outside the recognized state set.
Expected
The database rejects the invalid state without changing the period.
Data
A generated period is available under its database constraints.
Bound to
Source
services-accounting:modules/fiscal-close/tests/integration/db/fiscal-close.table.integration.spec.js#refuses a status that is not one of the four

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.