Skip to content

ATS-ACC-REC-011Finalize a balanced explanation with eligible approval: Capability Test Specification

Markdown

ATS-ACC-REC-011

Finalize a balanced explanation with eligible approval: Capability Test Specification

Markdown
  • DocumentProposed

KindAcceptance test setProduct areaAccountingModuleReconciliationRevision3

Read atservices-accounting f47cb263react-console baf6dae3

Coverage

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

Test Scenarios

15 scenarios proving CAP-ACC-REC-011; 12 bound to an existing test.

01 Finalize key and lifecycle guardsvalidationapinegativetest
Proves
BR-CAP-ACC-REC-011-01
Preconditions
An open balanced reconciliation is available.
Steps
Finalize and replay its key, then try a new key, no key and an invalid version.
Expected
Identical replay adds no posting; fresh finalization, missing key and invalid version fail.
Data
Provide Two people for this case.
Bound to
services-accounting:modules/reconciliation/tests/e2e/batch-lifecycle.e2e.spec.js#refuses a request without an Idempotency-Key with 400
services-accounting:modules/reconciliation/tests/e2e/batch-lifecycle.e2e.spec.js#refuses a body whose version is not a number with 400
Source
services-accounting:modules/reconciliation/tests/integration/services/batch-lifecycle/finalize-batch.integration.spec.js#replays the stored answer for the same key and request
02 Rows decide exact balanceinvariantapinegativetest
Proves
BR-CAP-ACC-REC-011-02
Preconditions
Examples include a one-unit difference and inconsistent maintained counters.
Steps
Attempt finalization for each.
Expected
Nonzero actual difference fails and is audited; balanced rows govern even when counters drift.
Data
No additional fixture beyond the case setup.
Bound to
services-accounting:modules/reconciliation/tests/integration/services/batch-lifecycle/finalize-batch.integration.spec.js#finalizes a batch whose rows balance whatever its counters say, writing the rows’ totals
services-accounting:modules/reconciliation/tests/e2e/batch-lifecycle.e2e.spec.js#refuses an unbalanced batch with 409, its code and its difference
Source
services-accounting:modules/reconciliation/tests/integration/services/batch-lifecycle/finalize-batch.integration.spec.js#refuses a batch one minor unit short, naming the difference
03 Preparer exclusion and audited waiverpermissionapinegativetest
Proves
BR-CAP-ACC-REC-011-03 BR-CAP-ACC-REC-011-04
Preconditions
The preparer’s reconciliation is tested with second-person enforcement enabled and disabled.
Steps
Attempt the preparer’s finalize under both settings.
Expected
Enforcement refuses and audits self-approval; the disabled setting permits a visibly waived finalize.
Data
Provide Two people; the workspace setting for this case.
Bound to
services-accounting:modules/reconciliation/tests/integration/services/batch-lifecycle/finalize-batch.integration.spec.js#lets the preparer finalize where the tenant does not require a second person, waived
services-accounting:modules/reconciliation/tests/unit/rules/segregation.spec.js#refuses a preparer while a second person is required
services-accounting:modules/reconciliation/tests/unit/rules/segregation.spec.js#records any finalize as waived when the tenant does not require a second person
Source
services-accounting:modules/reconciliation/tests/integration/services/batch-lifecycle/finalize-batch.integration.spec.js#refuses the person who created the batch
04 Invalid current holdings block finalizevalidationapinegativetest
Proves
BR-CAP-ACC-REC-011-05
Preconditions
Examples contain a voided payout, resolved claim, absent payout or voided reconciliation.
Steps
Attempt each finalize.
Expected
Every invalid record remains unfinalized with a refusal.
Data
No additional fixture beyond the case setup.
Bound to
Source
services-accounting:modules/reconciliation/tests/integration/services/batch-lifecycle/finalize-batch.integration.spec.js#refuses a batch whose payout was voided after it was linked
05 Transfer lines and item recognitionruleapitest
Proves
BR-CAP-ACC-REC-011-06 BR-CAP-ACC-REC-011-08
Preconditions
The worked example includes positive, negative and zero payouts with distinct configured accounts.
Steps
Finalize the cases and inspect request lines and subsequent clearing effects.
Expected
Requests balance, bank debit sides reverse, zero transfers are absent and each bank has its net line within one transfer.
Data
Provide Distinct clearing, bank, fee and reserve accounts for this case.
Bound to
services-accounting:modules/reconciliation/tests/integration/services/batch-lifecycle/finalize-batch.integration.spec.js#asks the ledger for the transfer to the bank, the fee and the reserve, each balanced
services-accounting:modules/reconciliation/tests/integration/services/batch-lifecycle/finalize-batch.integration.spec.js#nets the clearing account to zero with the captures and the refund the payment code posts (INV-12)
services-accounting:modules/reconciliation/tests/unit/rules/posting-plans.spec.js#gives each bank account its own line, netting its payouts, and clearing one line for the total
services-accounting:modules/reconciliation/tests/unit/rules/posting-plans.spec.js#debits processor fee expense and credits clearing for a fee
Source
services-accounting:modules/reconciliation/tests/integration/services/batch-lifecycle/finalize-batch.integration.spec.js#asks the ledger for the transfer to the bank, the fee and the reserve, each balanced
06 Missing default identifies its purposefailureapinegativetest
Proves
BR-CAP-ACC-REC-011-07
Preconditions
The unit has no processor-fee expense default.
Steps
Finalize a balanced reconciliation including a fee.
Expected
The missing purpose is named and no ledger request is written.
Data
No additional fixture beyond the case setup.
Bound to
Source
services-accounting:modules/reconciliation/tests/integration/services/batch-lifecycle/finalize-batch.integration.spec.js#refuses a fee in a unit with no processor_fee_expense default
07 Seal, resolved problem and finalizer historytransitionapinegativetest
Proves
BR-CAP-ACC-REC-011-09 BR-CAP-ACC-REC-011-10
Preconditions
A finalized payout had an open unbalanced problem.
Steps
Change its holdings or money and inspect the exception and finalization activity.
Expected
Sealed changes fail, the problem is resolved with its reconciliation and activity keeps the finalizer and posting context.
Data
No additional fixture beyond the case setup.
Bound to
Source
services-accounting:modules/reconciliation/tests/integration/services/batch-lifecycle/finalize-batch.integration.spec.js#locks the finalized batch against updates and deletes
08 Close concurrency and selected batch dateconcurrencyapinegativetest
Proves
BR-CAP-ACC-REC-011-11
Preconditions
October is closing or closed, with a later operational batch available.
Steps
Finalize an October payout while close holds the period and after its completion.
Expected
Finalize waits, fails against a selected closed-period batch and uses the later batch when selected, preserving document day and late mark.
Data
Provide closed period for this case.
Bound to
services-accounting:modules/reconciliation/tests/integration/services/batch-lifecycle/finalize-concurrency.integration.spec.js#refuses the finalize once the close commits: its batch is dated in the closed October
services-accounting:modules/reconciliation/tests/integration/services/batch-lifecycle/finalize-concurrency.integration.spec.js#dates the request on the November batch’s date, the payout’s date its document date
Source
services-accounting:modules/reconciliation/tests/integration/services/batch-lifecycle/finalize-concurrency.integration.spec.js#makes the finalize wait on the period row while the close holds it
09 Finalize availability follows grants and preparationpermissionapinegativetest
Proves
BR-CAP-ACC-REC-011-12
Preconditions
Callers include a missing-grant user, preparer and independent approver.
Steps
Read available actions and attempt finalize as each.
Expected
Permission or preparation exclusions are explained; only an eligible approver can finalize.
Data
Assign callers through the relevant role policies.
Bound to
services-accounting:modules/reconciliation/tests/e2e/batch-lifecycle.e2e.spec.js#refuses a principal without accounting.reconciliation-batches.finalize with 403
services-accounting:modules/reconciliation/tests/integration/services/reconciliation-batches/batch-views.integration.spec.js#does not offer finalize to the person who prepared it, the tenant requiring a second person
services-accounting:modules/reconciliation/tests/unit/rules/batch-actions.spec.js#keeps only the actions whose permission the caller holds
Source
services-accounting:modules/reconciliation/tests/e2e/batch-lifecycle.e2e.spec.js#refuses a principal without accounting.reconciliation-batches.finalize with 403
10 Mock browser saves then finalizesinteractionbrowsertest
Proves
BR-CAP-ACC-REC-011-13
Preconditions
Mock mode supplies a balanced workspace and finalize authority.
Steps
Add an adjustment and activate Finalize.
Expected
Draft commands precede the finalize request and the mock success message appears; this does not prove live segregation.
Data
Use the live Accounting service boundary.
Bound to
react-console:e2e/mock/accounting-reconciliation.mock.spec.ts#Save Draft and Finalize send the claims, the manual item and the finalize command
Source
react-console:e2e/mock/accounting-reconciliation.mock.spec.ts#Save Draft and Finalize send the claims, the manual item and the finalize command
11 Independent approval through the APIinteractionapitest
Proves
BR-CAP-ACC-REC-011-03 BR-CAP-ACC-REC-011-06 AS-JNY-ACC-REC-001-03
Preconditions
Captures and a refund explain one payout.
Steps
Have the preparer create and claim, try their finalize, then have an independent approver finalize and retry.
Expected
Self-approval fails and independent approval creates one transfer before identical replay.
Data
Use the isolated reconciliation fixture unit.
Bound to
Source
react-console:acceptance/accounting/playwright/journeys/reconciliation-close/ACT-ACC-0590.spec.ts#ACT-ACC-0590
12 Finalize refusal journeyfailureapinegativetest
Proves
BR-CAP-ACC-REC-011-02 BR-CAP-ACC-REC-011-03 BR-CAP-ACC-REC-011-05
Preconditions
Cases have a nonzero difference, preparer conflict, absent payout, resolved claim or missing batch.
Steps
Attempt each finalize.
Expected
Each failure explains its cause; absent batch rolls back even the refusal event.
Data
Use the isolated reconciliation fixture unit.
Bound to
Source
react-console:acceptance/accounting/playwright/journeys/reconciliation-close/ACT-ACC-0597.spec.ts#ACT-ACC-0597
13 Reversal releases sealed holdingsinteractionapiproposed
Proves
BR-CAP-ACC-REC-011-09 BR-CAP-ACC-REC-011-10 AS-JNY-ACC-REC-003-01 AS-JNY-ACC-REC-003-02
Preconditions
Use one isolated workspace with the financial records and caller roles required by the relied-on cases.
Steps
[ { "do": "Finalize a balanced explanation, try a sealed edit, reverse it and create a replacement.", "expect": "The edit fails; the original approval remains historical and the replacement can claim released money.", "provenance": "proposed", "source": [ "specs/accounting/reconciliation/planning/capabilities/CAP-ACC-REC-011-approve-a-balanced-reconciliation-and-move-the-deposit-to.md", "specs/accounting/reconciliation/planning/capabilities/CAP-ACC-REC-013-correct-a-finalized-reconciliation-by-reversing-it-and.md" ] } ]
Expected
The edit fails; the original approval remains historical and the replacement can claim released money.
Data
Local merchant and bank accounts, an open operational batch and distinct preparation and approval callers.
Source
specs/accounting/reconciliation/planning/capabilities/CAP-ACC-REC-011-approve-a-balanced-reconciliation-and-move-the-deposit-to.md,specs/accounting/reconciliation/planning/capabilities/CAP-ACC-REC-013-correct-a-finalized-reconciliation-by-reversing-it-and.md
14 Contribution changes approval eligibilityinteractionapiproposed
Proves
BR-CAP-ACC-REC-011-03 BR-CAP-ACC-REC-011-04 BR-CAP-ACC-REC-020-02
Preconditions
Use one isolated workspace with the financial records and caller roles required by the relied-on cases.
Steps
[ { "do": "Have a second person add a manual entry, then try approval by that person and by an uninvolved third person.", "expect": "Only the uninvolved authorized approver completes approval under the default separation setting.", "provenance": "proposed", "source": [ "specs/accounting/reconciliation/planning/capabilities/CAP-ACC-REC-011-approve-a-balanced-reconciliation-and-move-the-deposit-to.md", "specs/accounting/reconciliation/planning/capabilities/CAP-ACC-REC-020-keep-preparing-apart-from-approving-and-leave-a-trail-of.md" ] } ]
Expected
Only the uninvolved authorized approver completes approval under the default separation setting.
Data
Local merchant and bank accounts, an open operational batch and distinct preparation and approval callers.
Source
specs/accounting/reconciliation/planning/capabilities/CAP-ACC-REC-011-approve-a-balanced-reconciliation-and-move-the-deposit-to.md,specs/accounting/reconciliation/planning/capabilities/CAP-ACC-REC-020-keep-preparing-apart-from-approving-and-leave-a-trail-of.md
15 Period locking coordinates approvalinteractionapiproposed
Proves
BR-CAP-ACC-REC-011-11 BR-CAP-ACC-REC-018-13
Preconditions
Use one isolated workspace with the financial records and caller roles required by the relied-on cases.
Steps
[ { "do": "Hold a period close lock during approval, complete close and retry with an open selected batch.", "expect": "Approval waits for the lock and later accounting preserves the original document day.", "provenance": "proposed", "source": [ "specs/accounting/reconciliation/planning/capabilities/CAP-ACC-REC-011-approve-a-balanced-reconciliation-and-move-the-deposit-to.md", "specs/accounting/reconciliation/planning/capabilities/CAP-ACC-REC-018-tell-month-end-close-what-stops-a-period-from-closing.md" ] } ]
Expected
Approval waits for the lock and later accounting preserves the original document day.
Data
Local merchant and bank accounts, an open operational batch and distinct preparation and approval callers.
Source
specs/accounting/reconciliation/planning/capabilities/CAP-ACC-REC-011-approve-a-balanced-reconciliation-and-move-the-deposit-to.md,specs/accounting/reconciliation/planning/capabilities/CAP-ACC-REC-018-tell-month-end-close-what-stops-a-period-from-closing.md

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.