---
id: TST-ACC-REC-049
title: Balanced independent approval
kind: integration
product_area: accounting
module: reconciliation
revision: 1
status: draft
source_sha:
  services-accounting: f47cb263875bbc0c5640fba7dae6785ec32695f8
repository: services-accounting
files:
  - modules/reconciliation/tests/integration/services/batch-lifecycle/finalize-batch.integration.spec.js
implements:
  - ATS-ACC-REC-011-01
  - ATS-ACC-REC-011-02
  - ATS-ACC-REC-011-03
  - ATS-ACC-REC-011-04
  - ATS-ACC-REC-011-05
  - ATS-ACC-REC-011-06
  - ATS-ACC-REC-011-07
  - ATS-ACC-REC-011-08
environment: local
implementation_state: implemented
latest_result: not-run
latest_run_at: null
latest_run_ref: null
conformance: not-verified
estimated_minutes: 5
isolation: Suite-owned workspace fixtures and deterministic records removed by suite cleanup.
evidence:
  - >-
    services-accounting:modules/reconciliation/tests/integration/services/batch-lifecycle/finalize-batch.integration.spec.js
bindings:
  - scenario: ATS-ACC-REC-011-01
    assertions:
      - >-
        services-accounting:modules/reconciliation/tests/integration/services/batch-lifecycle/finalize-batch.integration.spec.js#replays
        the stored answer for the same key and request
      - >-
        services-accounting:modules/reconciliation/tests/integration/services/batch-lifecycle/finalize-batch.integration.spec.js#asks
        the ledger for nothing more on the replay
      - >-
        services-accounting:modules/reconciliation/tests/integration/services/batch-lifecycle/finalize-batch.integration.spec.js#refuses
        another key after success, naming the state (DEF-ACT-0596)
  - scenario: ATS-ACC-REC-011-02
    assertions:
      - >-
        services-accounting:modules/reconciliation/tests/integration/services/batch-lifecycle/finalize-batch.integration.spec.js#refuses
        a batch one minor unit short, naming the difference
      - >-
        services-accounting:modules/reconciliation/tests/integration/services/batch-lifecycle/finalize-batch.integration.spec.js#leaves
        the refused batch open
      - >-
        services-accounting:modules/reconciliation/tests/integration/services/batch-lifecycle/finalize-batch.integration.spec.js#records
        the refusal as batch.finalize-refused with the difference
      - >-
        services-accounting:modules/reconciliation/tests/integration/services/batch-lifecycle/finalize-batch.integration.spec.js#refuses
        a batch whose counters balance but whose rows do not
      - >-
        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
  - scenario: ATS-ACC-REC-011-03
    assertions:
      - >-
        services-accounting:modules/reconciliation/tests/integration/services/batch-lifecycle/finalize-batch.integration.spec.js#refuses
        the person who created the batch
      - >-
        services-accounting:modules/reconciliation/tests/integration/services/batch-lifecycle/finalize-batch.integration.spec.js#refuses
        a person who claimed items in it
      - >-
        services-accounting:modules/reconciliation/tests/integration/services/batch-lifecycle/finalize-batch.integration.spec.js#records
        the refusal as batch.finalize-refused
      - >-
        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/integration/services/batch-lifecycle/finalize-batch.integration.spec.js#records
        segregation.waived for that finalize
  - scenario: ATS-ACC-REC-011-04
    assertions:
      - >-
        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
      - >-
        services-accounting:modules/reconciliation/tests/integration/services/batch-lifecycle/finalize-batch.integration.spec.js#refuses
        a batch whose item was resolved after it was claimed
      - >-
        services-accounting:modules/reconciliation/tests/integration/services/batch-lifecycle/finalize-batch.integration.spec.js#refuses
        a batch that explains no payout
      - >-
        services-accounting:modules/reconciliation/tests/integration/services/batch-lifecycle/finalize-batch.integration.spec.js#refuses
        a voided batch
  - scenario: ATS-ACC-REC-011-05
    assertions:
      - >-
        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/integration/services/batch-lifecycle/finalize-batch.integration.spec.js#posts
        a bank debit from the bank to clearing
      - >-
        services-accounting:modules/reconciliation/tests/integration/services/batch-lifecycle/finalize-batch.integration.spec.js#posts
        no transfer for a zero payout, only the fee it recognises
  - scenario: ATS-ACC-REC-011-06
    assertions:
      - >-
        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
  - scenario: ATS-ACC-REC-011-07
    assertions:
      - >-
        services-accounting:modules/reconciliation/tests/integration/services/batch-lifecycle/finalize-batch.integration.spec.js#locks
        the finalized batch against updates and deletes
      - >-
        services-accounting:modules/reconciliation/tests/integration/services/batch-lifecycle/finalize-batch.integration.spec.js#refuses
        releasing one of its claims (RHF30)
      - >-
        services-accounting:modules/reconciliation/tests/integration/services/batch-lifecycle/finalize-batch.integration.spec.js#refuses
        changing its payout’s amount (RHF30)
      - >-
        services-accounting:modules/reconciliation/tests/integration/services/batch-lifecycle/finalize-batch.integration.spec.js#refuses
        changing the batch itself (RHF30)
      - >-
        services-accounting:modules/reconciliation/tests/integration/services/batch-lifecycle/finalize-batch.integration.spec.js#resolves
        the payout’s unbalanced-payout exception naming the batch
      - >-
        services-accounting:modules/reconciliation/tests/integration/services/batch-lifecycle/finalize-batch.integration.spec.js#records
        batch.finalized by the approver with the posting dates, batch and keys
  - scenario: ATS-ACC-REC-011-08
    assertions:
      - >-
        services-accounting:modules/reconciliation/tests/integration/services/batch-lifecycle/finalize-batch.integration.spec.js#records
        lateAfterClose in the finalize event
---

# Balanced independent approval

## Verification Boundary

This suite calls production services over the real test database. Fixture setup may write records directly; the exercised commands and queries retain their normal database enforcement.

## What This Suite Proves

The executable assertions identified in the binding records supply the registered scenario observations. When a scenario names several suites, this suite supplies its listed assertions and does not independently establish every clause.

## What It Does Not Prove

Deployed infrastructure, live console behavior and shared scheduling delivery are outside this local boundary.

## Real Dependencies and Test Doubles

PostgreSQL, migrations and the exercised production code are real. Fixtures supply the financial world and caller context; deterministic setup and owner-side inspection do not replace database enforcement.

## Must Not Be Doubled

The exercised database constraints, transactional services and route enforcement remain real. Replacing them would remove the boundary this suite registers.
