---
id: ATS-ACC-REC-012
scope: CAP-ACC-REC-012
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-012-01
    title: 'Void reason, version and open state'
    level: api
    proves:
      - BR-CAP-ACC-REC-012-01
    preconditions: Open and finalized examples exist.
    steps: 'Omit the void reason, use a stale version and void finalized state.'
    expected: All invalid voids fail.
    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 void
        without a reason with 400
      - >-
        services-accounting:modules/reconciliation/tests/integration/services/batch-lifecycle/void-batch.integration.spec.js#refuses
        a stale version
      - >-
        services-accounting:modules/reconciliation/tests/integration/services/batch-lifecycle/void-batch.integration.spec.js#refuses
        a finalized batch
      - >-
        services-accounting:modules/reconciliation/tests/e2e/batch-lifecycle.e2e.spec.js#refuses a finalized
        batch with 409
      - TST-ACC-REC-023
      - TST-ACC-REC-053
    provenance: test
    source: >-
      services-accounting:modules/reconciliation/tests/e2e/batch-lifecycle.e2e.spec.js#refuses a void without
      a reason with 400
    category: validation
  - id: ATS-ACC-REC-012-02
    title: Void releases without accounting
    level: api
    proves:
      - BR-CAP-ACC-REC-012-02
      - BR-CAP-ACC-REC-012-03
      - BR-CAP-ACC-REC-012-04
      - BR-CAP-ACC-REC-012-07
    preconditions: 'A draft owns a payout, matched capture and manual fee.'
    steps: Void it and place the released payout in another draft.
    expected: >-
      Holdings are released with the reason, the fee is withdrawn, capture stays unresolved and no posting is
      requested.
    negative: false
    data_needs: No additional fixture beyond the case setup.
    bound_to:
      - >-
        services-accounting:modules/reconciliation/tests/integration/services/batch-lifecycle/void-batch.integration.spec.js#releases
        every claim with the reason
      - >-
        services-accounting:modules/reconciliation/tests/integration/services/batch-lifecycle/void-batch.integration.spec.js#releases
        the payout link with the reason
      - >-
        services-accounting:modules/reconciliation/tests/integration/services/batch-lifecycle/void-batch.integration.spec.js#withdraws
        the manual fee and leaves the capture unresolved
      - >-
        services-accounting:modules/reconciliation/tests/integration/services/batch-lifecycle/void-batch.integration.spec.js#asks
        the ledger for nothing
      - >-
        services-accounting:modules/reconciliation/tests/integration/services/batch-lifecycle/void-batch.integration.spec.js#records
        batch.voided with the reason and what it released
      - >-
        services-accounting:modules/reconciliation/tests/integration/services/batch-lifecycle/void-batch.integration.spec.js#frees
        the payout to be linked by another batch
      - TST-ACC-REC-053
    provenance: test
    source: >-
      services-accounting:modules/reconciliation/tests/integration/services/batch-lifecycle/void-batch.integration.spec.js#releases
      every claim with the reason
    category: interaction
  - id: ATS-ACC-REC-012-03
    title: Stored lifecycle transition matrix
    level: unit
    proves:
      - BR-CAP-ACC-REC-012-05
    preconditions: Every stored reconciliation state is represented.
    steps: Evaluate all possible state moves.
    expected: 'Only open-to-finalized, open-to-voided and finalized-to-reversed transitions pass.'
    negative: false
    data_needs: No additional fixture beyond the case setup.
    bound_to:
      - 'services-accounting:modules/reconciliation/tests/unit/rules/transitions.spec.js#allows finalized'
      - 'services-accounting:modules/reconciliation/tests/unit/rules/transitions.spec.js#allows voided'
      - 'services-accounting:modules/reconciliation/tests/unit/rules/transitions.spec.js#allows reversed'
      - >-
        services-accounting:modules/reconciliation/tests/unit/rules/transitions.spec.js#refuses voided as
        batch-not-open
      - >-
        services-accounting:modules/reconciliation/tests/unit/rules/transitions.spec.js#refuses open as
        batch-terminal
      - >-
        services-accounting:modules/reconciliation/tests/unit/rules/transitions.spec.js#refuses finalized as
        batch-terminal
      - TST-ACC-REC-095
    provenance: test
    source: 'services-accounting:modules/reconciliation/tests/unit/rules/transitions.spec.js#allows finalized'
    category: transition
  - id: ATS-ACC-REC-012-04
    title: Terminal draft abandonment
    level: api
    proves:
      - BR-CAP-ACC-REC-012-06
    preconditions: A voided reconciliation exists.
    steps: Edit it or add a claim.
    expected: The terminal seal refuses both changes.
    negative: true
    data_needs: No additional fixture beyond the case setup.
    bound_to:
      - >-
        services-accounting:modules/reconciliation/tests/integration/services/batch-lifecycle/void-batch.integration.spec.js#leaves
        the voided batch sealed (RHF30)
      - >-
        services-accounting:modules/reconciliation/tests/integration/db/reconciliation-batches.table.integration.spec.js#refuses
        any change to a voided batch
      - >-
        services-accounting:modules/reconciliation/tests/integration/db/reconciliation-allocations.table.integration.spec.js#refuses
        a claim into a voided batch
      - TST-ACC-REC-053
      - TST-ACC-REC-036
      - TST-ACC-REC-034
    provenance: test
    source: >-
      services-accounting:modules/reconciliation/tests/integration/services/batch-lifecycle/void-batch.integration.spec.js#leaves
      the voided batch sealed (RHF30)
    category: invariant
  - id: ATS-ACC-REC-012-05
    title: Void requires delete
    level: api
    proves:
      - BR-CAP-ACC-REC-012-08
    preconditions: The caller lacks reconciliation delete.
    steps: Attempt a draft void.
    expected: Authorization refuses the command.
    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.delete with 403
      - TST-ACC-REC-023
    provenance: test
    source: >-
      services-accounting:modules/reconciliation/tests/e2e/batch-lifecycle.e2e.spec.js#refuses a principal
      without accounting.reconciliation-batches.delete with 403
    category: permission
  - id: ATS-ACC-REC-012-06
    title: Void chain frees the payout reference
    level: api
    proves:
      - AS-JNY-ACC-REC-002-02
    preconditions: A draft holds a payout.
    steps: 'Try payout void, void the draft, void the released payout and reuse its reference.'
    expected: 'The held void fails, followed by successful draft and payout void and reference reuse.'
    negative: false
    data_needs: Use the isolated reconciliation fixture unit.
    bound_to:
      - >-
        react-console:acceptance/accounting/playwright/journeys/reconciliation-close/ACT-ACC-0593.spec.ts#ACT-ACC-0593
      - TST-ACC-REC-003
    provenance: test
    source: >-
      react-console:acceptance/accounting/playwright/journeys/reconciliation-close/ACT-ACC-0593.spec.ts#ACT-ACC-0593
    category: interaction
  - id: ATS-ACC-REC-012-07
    title: Abandonment permits payout cancellation
    category: interaction
    level: api
    proves:
      - AS-JNY-ACC-REC-002-02
      - BR-CAP-ACC-REC-002-06
      - BR-CAP-ACC-REC-002-07
    interacts_with:
      - CAP-ACC-REC-002
    relies_on:
      - ATS-ACC-REC-012-06
      - ATS-ACC-REC-002-04
    preconditions: Use one isolated workspace with the financial records and caller roles required by the relied-on cases.
    steps:
      - do: 'Try to void a held payout, abandon its draft and repeat payout cancellation.'
        expect: The held attempt fails and the released payout can then be cancelled.
        provenance: proposed
        source:
          - >-
            specs/accounting/reconciliation/planning/capabilities/CAP-ACC-REC-012-abandon-a-draft-reconciliation-and-free-what-it-held.md
          - >-
            specs/accounting/reconciliation/planning/capabilities/CAP-ACC-REC-002-correct-document-or-void-a-deposit-until-it-is-reconciled.md
    expected: The held attempt fails and the released payout can then be cancelled.
    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-012-abandon-a-draft-reconciliation-and-free-what-it-held.md
      - >-
        specs/accounting/reconciliation/planning/capabilities/CAP-ACC-REC-002-correct-document-or-void-a-deposit-until-it-is-reconciled.md
  - id: ATS-ACC-REC-012-08
    title: Abandonment and reversal retain different accounting
    category: interaction
    level: api
    proves:
      - BR-CAP-ACC-REC-012-02
      - BR-CAP-ACC-REC-012-03
      - BR-CAP-ACC-REC-012-04
      - BR-CAP-ACC-REC-012-07
      - BR-CAP-ACC-REC-013-03
      - BR-CAP-ACC-REC-013-08
    interacts_with:
      - CAP-ACC-REC-013
    relies_on:
      - ATS-ACC-REC-012-02
      - ATS-ACC-REC-013-03
    preconditions: Use one isolated workspace with the financial records and caller roles required by the relied-on cases.
    steps:
      - do: Abandon an open explanation and reverse a finalized explanation with the same money pattern.
        expect: Both release holdings; only the approved explanation retains original requests and their mirrors.
        provenance: proposed
        source:
          - >-
            specs/accounting/reconciliation/planning/capabilities/CAP-ACC-REC-012-abandon-a-draft-reconciliation-and-free-what-it-held.md
          - >-
            specs/accounting/reconciliation/planning/capabilities/CAP-ACC-REC-013-correct-a-finalized-reconciliation-by-reversing-it-and.md
    expected: Both release holdings; only the approved explanation retains original requests and their mirrors.
    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-012-abandon-a-draft-reconciliation-and-free-what-it-held.md
      - >-
        specs/accounting/reconciliation/planning/capabilities/CAP-ACC-REC-013-correct-a-finalized-reconciliation-by-reversing-it-and.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
  invariant: covered
  interaction: covered
  rule: 'gap: FND-ACC-REC-057'
  edge: 'gap: FND-ACC-REC-057'
  failure: 'gap: FND-ACC-REC-057'
  boundary: 'gap: FND-ACC-REC-057'
  concurrency: 'gap: FND-ACC-REC-057'
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.
---

# Abandon a draft and release its money: Capability Test Specification

## Coverage

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

## Interactions With Related Capabilities

Void releases without accounting. Void chain frees the payout reference. Abandonment permits payout cancellation. Abandonment and reversal retain different accounting. Proposed interaction cases require executable proof.
