---
id: ATS-ACC-REC-013
scope: CAP-ACC-REC-013
product_area: accounting
module: reconciliation
revision: 3
status: proposed
approved_by: null
approved_at: null
source_sha:
  services-accounting: f47cb263875bbc0c5640fba7dae6785ec32695f8
  react-console: baf6dae382d6f41dce976c7f848667ccc37e076f
scenarios:
  - id: ATS-ACC-REC-013-01
    title: Finalized records cannot reopen
    level: api
    proves:
      - BR-CAP-ACC-REC-013-01
    preconditions: A reconciliation is finalized.
    steps: Attempt to move it back to open.
    expected: Reopening is refused as an unsupported correction path.
    negative: true
    data_needs: No additional fixture beyond the case setup.
    bound_to:
      - >-
        services-accounting:modules/reconciliation/tests/unit/rules/transitions.spec.js#refuses open as
        batch-reopen-not-offered
      - >-
        services-accounting:modules/reconciliation/tests/integration/db/reconciliation-batches.table.integration.spec.js#refuses
        to reopen a finalized batch
      - TST-ACC-REC-095
      - TST-ACC-REC-036
    provenance: test
    source: >-
      services-accounting:modules/reconciliation/tests/unit/rules/transitions.spec.js#refuses open as
      batch-reopen-not-offered
    category: transition
  - id: ATS-ACC-REC-013-02
    title: Reversal keys and eligible state
    level: api
    proves:
      - BR-CAP-ACC-REC-013-02
    preconditions: Open and already reversed examples are available.
    steps: 'Reverse without a key, reverse open state and submit a fresh-key repeat reversal.'
    expected: 'Every invalid reversal fails, with auditable state refusals where applicable.'
    negative: true
    data_needs: No additional fixture beyond the case setup.
    bound_to:
      - >-
        services-accounting:modules/reconciliation/tests/e2e/batch-lifecycle.e2e.spec.js#refuses a reversal
        without an Idempotency-Key with 400
      - >-
        services-accounting:modules/reconciliation/tests/integration/services/batch-lifecycle/reverse-batch.integration.spec.js#refuses
        an open batch
      - >-
        services-accounting:modules/reconciliation/tests/integration/services/batch-lifecycle/reverse-batch.integration.spec.js#records
        the refusal as batch.reverse-refused
      - >-
        services-accounting:modules/reconciliation/tests/integration/services/batch-lifecycle/reverse-batch.integration.spec.js#refuses
        a second reversal under another key, naming the state (DEF-ACT-0596)
      - TST-ACC-REC-023
      - TST-ACC-REC-052
    provenance: test
    source: >-
      services-accounting:modules/reconciliation/tests/e2e/batch-lifecycle.e2e.spec.js#refuses a reversal
      without an Idempotency-Key with 400
    category: validation
  - id: ATS-ACC-REC-013-03
    title: Immediate open-period reversal
    level: api
    proves:
      - BR-CAP-ACC-REC-013-03
      - BR-CAP-ACC-REC-013-08
    preconditions: A finalized reconciliation’s original period is open.
    steps: 'Reverse with a reason and inspect the record, requests and holdings.'
    expected: >-
      Mirrors swap posting sides, the record becomes reversed and released holdings and reversal identities
      remain visible.
    negative: false
    data_needs: No additional fixture beyond the case setup.
    bound_to:
      - >-
        services-accounting:modules/reconciliation/tests/integration/services/batch-lifecycle/reverse-batch.integration.spec.js#answers
        the reversed batch whole
      - >-
        services-accounting:modules/reconciliation/tests/integration/services/batch-lifecycle/reverse-batch.integration.spec.js#asks
        for the mirrors of the transfer and the fee, debits and credits swapped, in the unit’s batch on its
        date
      - >-
        services-accounting:modules/reconciliation/tests/integration/services/batch-lifecycle/reverse-batch.integration.spec.js#releases
        its claims and payout link with the reason
      - >-
        services-accounting:modules/reconciliation/tests/integration/services/batch-lifecycle/reverse-batch.integration.spec.js#records
        batch.reversed with its dates, batch and mirrors
      - >-
        services-accounting:modules/reconciliation/tests/integration/services/batch-lifecycle/reverse-batch.integration.spec.js#reads
        the reversal on the reversed batch itself: reason, requester, approver and time (DEF-ACT-0594)
      - >-
        services-accounting:modules/reconciliation/tests/unit/rules/posting-plans.spec.js#swaps every line’s
        debit and credit under the transfer’s reverse key
      - >-
        services-accounting:modules/reconciliation/tests/e2e/reconciliation-scenario.e2e.spec.js#step 13:
        mirrors every posting of the finalize, debits and credits swapped
      - TST-ACC-REC-052
      - TST-ACC-REC-091
      - TST-ACC-REC-028
    provenance: test
    source: >-
      services-accounting:modules/reconciliation/tests/integration/services/batch-lifecycle/reverse-batch.integration.spec.js#answers
      the reversed batch whole
    category: transition
  - id: ATS-ACC-REC-013-04
    title: Closed-period independent approval
    level: api
    proves:
      - BR-CAP-ACC-REC-013-04
      - BR-CAP-ACC-REC-013-05
      - BR-CAP-ACC-REC-013-06
    preconditions: A finalized reconciliation belongs to closed October.
    steps: >-
      Request twice and approve as requester, at stale version and with a closed selected batch before using a
      second person and open November batch.
    expected: The request waits without mirrors; invalid approvals fail and valid approval dates mirrors in November.
    negative: true
    data_needs: Provide closed period and a later batch for this case.
    bound_to:
      - >-
        services-accounting:modules/reconciliation/tests/integration/services/batch-lifecycle/reverse-batch.integration.spec.js#records
        the request and leaves the batch finalized, awaiting a second approval
      - >-
        services-accounting:modules/reconciliation/tests/integration/services/batch-lifecycle/reverse-batch.integration.spec.js#asks
        for no mirror yet
      - >-
        services-accounting:modules/reconciliation/tests/integration/services/batch-lifecycle/reverse-batch.integration.spec.js#records
        batch.reversal-requested
      - >-
        services-accounting:modules/reconciliation/tests/integration/services/batch-lifecycle/reverse-batch.integration.spec.js#refuses
        a second request while one awaits approval
      - >-
        services-accounting:modules/reconciliation/tests/integration/services/batch-lifecycle/reverse-batch.integration.spec.js#refuses
        the requester’s own approval
      - >-
        services-accounting:modules/reconciliation/tests/integration/services/batch-lifecycle/reverse-batch.integration.spec.js#refuses
        an approval at a stale version
      - >-
        services-accounting:modules/reconciliation/tests/integration/services/batch-lifecycle/reverse-batch.integration.spec.js#refuses
        the approval: the batch its mirrors would ride in is in a closed period
      - >-
        services-accounting:modules/reconciliation/tests/integration/services/batch-lifecycle/reverse-batch.integration.spec.js#leaves
        the reversal awaiting approval
      - >-
        services-accounting:modules/reconciliation/tests/integration/services/batch-lifecycle/reverse-batch.integration.spec.js#answers
        the reversed batch with its approver
      - >-
        services-accounting:modules/reconciliation/tests/integration/services/batch-lifecycle/reverse-batch.integration.spec.js#dates
        the mirrors on the November batch’s date, the original date their document date
      - >-
        services-accounting:modules/reconciliation/tests/integration/db/reconciliation-batches.table.integration.spec.js#refuses
        a reversal approved by the person who requested it
      - TST-ACC-REC-052
      - TST-ACC-REC-036
    provenance: test
    source: >-
      services-accounting:modules/reconciliation/tests/integration/services/batch-lifecycle/reverse-batch.integration.spec.js#records
      the request and leaves the batch finalized, awaiting a second approval
    category: permission
  - id: ATS-ACC-REC-013-05
    title: Recognition after reversal
    level: api
    proves:
      - BR-CAP-ACC-REC-013-07
    preconditions: A reversed reconciliation retains its manual fee.
    steps: Reconcile the released payout with that fee and finalize again.
    expected: The fee’s subsequent recognition receives its next numbered key.
    negative: false
    data_needs: No additional fixture beyond the case setup.
    bound_to:
      - >-
        services-accounting:modules/reconciliation/tests/integration/services/batch-lifecycle/reverse-batch.integration.spec.js#recognises
        the fee under its second key when a new batch reconciles it again
      - >-
        services-accounting:modules/reconciliation/tests/unit/rules/posting-plans.spec.js#numbers a second
        recognition after a reversal
      - >-
        services-accounting:modules/reconciliation/tests/e2e/reconciliation-scenario.e2e.spec.js#step 13:
        releases the claims, so batch 1042’s captures are outstanding again
      - TST-ACC-REC-052
      - TST-ACC-REC-091
      - TST-ACC-REC-028
    provenance: test
    source: >-
      services-accounting:modules/reconciliation/tests/integration/services/batch-lifecycle/reverse-batch.integration.spec.js#recognises
      the fee under its second key when a new batch reconciles it again
    category: interaction
  - id: ATS-ACC-REC-013-06
    title: Missing reversal batch rolls back
    level: api
    proves:
      - BR-CAP-ACC-REC-013-09
    preconditions: No open operational batch can carry mirrors.
    steps: Attempt reversal.
    expected: 'State, version and holdings remain finalized, with no mirror or event.'
    negative: true
    data_needs: No additional fixture beyond the case setup.
    bound_to:
      - >-
        services-accounting:modules/reconciliation/tests/integration/services/batch-lifecycle/reverse-batch.integration.spec.js#refuses
        the reversal: no open batch takes its mirrors
      - >-
        services-accounting:modules/reconciliation/tests/integration/services/batch-lifecycle/reverse-batch.integration.spec.js#writes
        nothing: the batch finalized at its version, its claims held, no mirror, no event
      - TST-ACC-REC-052
    provenance: test
    source: >-
      services-accounting:modules/reconciliation/tests/integration/services/batch-lifecycle/reverse-batch.integration.spec.js#refuses
      the reversal: no open batch takes its mirrors
    category: failure
  - id: ATS-ACC-REC-013-07
    title: Reverse requires its sensitive grant
    level: api
    proves:
      - BR-CAP-ACC-REC-013-10
    preconditions: A caller lacks reverse permission.
    steps: Submit a reversal as that caller.
    expected: The command is forbidden.
    negative: true
    data_needs: No additional fixture beyond the case setup.
    bound_to:
      - >-
        services-accounting:modules/reconciliation/tests/e2e/batch-lifecycle.e2e.spec.js#refuses a principal
        without accounting.reconciliation-batches.reverse with 403
      - >-
        services-accounting:modules/reconciliation/tests/e2e/reconciliation-scenario.e2e.spec.js#step 13:
        refuses the reverse to a user without accounting.reconciliation-batches.reverse with 403
      - TST-ACC-REC-023
      - TST-ACC-REC-028
    provenance: test
    source: >-
      services-accounting:modules/reconciliation/tests/e2e/batch-lifecycle.e2e.spec.js#refuses a principal
      without accounting.reconciliation-batches.reverse with 403
    category: permission
  - id: ATS-ACC-REC-013-08
    title: Corrected reconciliation journey
    level: api
    proves:
      - AS-JNY-ACC-REC-003-01
      - AS-JNY-ACC-REC-003-02
    preconditions: A finalized record includes a wrong fee.
    steps: 'Reverse it, prepare the correct explanation and inspect readiness.'
    expected: >-
      Mirrors and renewed recognitions accompany the replacement, with no pending approval and one current
      payout reconciliation.
    negative: false
    data_needs: Use the isolated reconciliation fixture unit.
    bound_to:
      - >-
        react-console:acceptance/accounting/playwright/journeys/reconciliation-close/ACT-ACC-0600.spec.ts#ACT-ACC-0600
      - TST-ACC-REC-009
    provenance: test
    source: >-
      react-console:acceptance/accounting/playwright/journeys/reconciliation-close/ACT-ACC-0600.spec.ts#ACT-ACC-0600
    category: interaction
  - id: ATS-ACC-REC-013-09
    title: Late effect and closed-period reversal
    level: api
    proves:
      - AS-JNY-ACC-REC-003-03
    preconditions: A closed month is followed by an open month with an accepting batch.
    steps: Finalize the old deposit and request reversal with independent approval.
    expected: Forward posting is marked late and the reversal requester cannot approve their own request.
    negative: true
    data_needs: Provide closed month for this case.
    bound_to:
      - >-
        react-console:acceptance/accounting/playwright/journeys/reconciliation-close/ACT-ACC-0601.spec.ts#ACT-ACC-0601
      - TST-ACC-REC-010
    provenance: test
    source: >-
      react-console:acceptance/accounting/playwright/journeys/reconciliation-close/ACT-ACC-0601.spec.ts#ACT-ACC-0601
    category: interaction
  - id: ATS-ACC-REC-013-10
    title: Replacement reuses released evidence
    category: interaction
    level: api
    proves:
      - BR-CAP-ACC-REC-013-07
      - BR-CAP-ACC-REC-008-04
    interacts_with:
      - CAP-ACC-REC-008
    relies_on:
      - ATS-ACC-REC-013-05
      - ATS-ACC-REC-008-04
    preconditions: Use one isolated workspace with the financial records and caller roles required by the relied-on cases.
    steps:
      - do: 'Reverse an explanation, reopen its payout and select released matched and manual effects.'
        expect: The replacement has a new identity and reuses eligible evidence without changing reversed history.
        provenance: proposed
        source:
          - >-
            specs/accounting/reconciliation/planning/capabilities/CAP-ACC-REC-013-correct-a-finalized-reconciliation-by-reversing-it-and.md
          - >-
            specs/accounting/reconciliation/planning/capabilities/CAP-ACC-REC-008-open-a-reconciliation-over-a-deposit-and-see-what-explains.md
    expected: The replacement has a new identity and reuses eligible evidence without changing reversed history.
    negative: false
    data_needs: >-
      Local merchant and bank accounts, an open operational batch and distinct preparation and approval
      callers.
    bound_to: []
    provenance: proposed
    source:
      - >-
        specs/accounting/reconciliation/planning/capabilities/CAP-ACC-REC-013-correct-a-finalized-reconciliation-by-reversing-it-and.md
      - >-
        specs/accounting/reconciliation/planning/capabilities/CAP-ACC-REC-008-open-a-reconciliation-over-a-deposit-and-see-what-explains.md
  - id: ATS-ACC-REC-013-11
    title: Pending reversal appears in assessment
    category: interaction
    level: api
    proves:
      - BR-CAP-ACC-REC-013-04
      - BR-CAP-ACC-REC-013-05
      - BR-CAP-ACC-REC-013-06
      - BR-CAP-ACC-REC-018-05
      - BR-CAP-ACC-REC-018-06
    interacts_with:
      - CAP-ACC-REC-018
    relies_on:
      - ATS-ACC-REC-013-04
      - ATS-ACC-REC-018-04
    preconditions: Use one isolated workspace with the financial records and caller roles required by the relied-on cases.
    steps:
      - do: 'Request reversal in a closed period, assess, approve using an open-period batch and assess again.'
        expect: Pending approval disappears after completion while unposted mirrors remain a separate concern.
        provenance: proposed
        source:
          - >-
            specs/accounting/reconciliation/planning/capabilities/CAP-ACC-REC-013-correct-a-finalized-reconciliation-by-reversing-it-and.md
          - >-
            specs/accounting/reconciliation/planning/capabilities/CAP-ACC-REC-018-tell-month-end-close-what-stops-a-period-from-closing.md
    expected: Pending approval disappears after completion while unposted mirrors remain a separate concern.
    negative: false
    data_needs: >-
      Local merchant and bank accounts, an open operational batch and distinct preparation and approval
      callers.
    bound_to: []
    provenance: proposed
    source:
      - >-
        specs/accounting/reconciliation/planning/capabilities/CAP-ACC-REC-013-correct-a-finalized-reconciliation-by-reversing-it-and.md
      - >-
        specs/accounting/reconciliation/planning/capabilities/CAP-ACC-REC-018-tell-month-end-close-what-stops-a-period-from-closing.md
evidence:
  - >-
    Bindings identify existing tests at the pinned revisions; proposed cases remain unbound and describe the
    proof still needed.
coverage:
  transition: covered
  validation: covered
  permission: covered
  failure: covered
  interaction: covered
  rule: 'gap: FND-ACC-REC-058'
  edge: 'gap: FND-ACC-REC-058'
  boundary: 'gap: FND-ACC-REC-058'
  concurrency: 'gap: FND-ACC-REC-058'
  invariant: 'gap: FND-ACC-REC-058'
coverage_notes:
  design_completeness: >-
    Covered categories count specified cases, including proposed cases. Exhaustive state-transition,
    permission-key and domain-invariant traceability remains a separate proof gap.
---

# Reverse an approved explanation and prepare its replacement: Capability Test Specification

## Coverage

| Rule | Proved by |
|---|---|
| `BR-CAP-ACC-REC-013-01` | `ATS-ACC-REC-013-01` |
| `BR-CAP-ACC-REC-013-02` | `ATS-ACC-REC-013-02` |
| `BR-CAP-ACC-REC-013-03` | `ATS-ACC-REC-013-03` |
| `BR-CAP-ACC-REC-013-04` | `ATS-ACC-REC-013-04` |
| `BR-CAP-ACC-REC-013-05` | `ATS-ACC-REC-013-04` |
| `BR-CAP-ACC-REC-013-06` | `ATS-ACC-REC-013-04` |
| `BR-CAP-ACC-REC-013-07` | `ATS-ACC-REC-013-05` |
| `BR-CAP-ACC-REC-013-08` | `ATS-ACC-REC-013-03` |
| `BR-CAP-ACC-REC-013-09` | `ATS-ACC-REC-013-06` |
| `BR-CAP-ACC-REC-013-10` | `ATS-ACC-REC-013-07` |

## Interactions With Related Capabilities

Recognition after reversal. Corrected reconciliation journey. Late effect and closed-period reversal. Replacement reuses released evidence. Pending reversal appears in assessment. Proposed interaction cases require executable proof.
