---
id: ATS-ACC-BAT-007
scope: CAP-ACC-BAT-007
product_area: accounting
module: batches
revision: 2
status: proposed
source_sha:
  services-accounting: f47cb263875bbc0c5640fba7dae6785ec32695f8
  react-console: baf6dae382d6f41dce976c7f848667ccc37e076f
  rhythm-v2-docs: 37405d50d1465ea0571a66095d98ebec4db04175
scenarios:
  - id: ATS-ACC-BAT-007-01
    title: Issuance rejects unsuitable intake batches
    level: api
    proves:
      - BR-CAP-ACC-BAT-007-01
      - BR-CAP-ACC-BAT-007-10
    preconditions: 'Selected batches are Closed, system-owned or Open in another unit.'
    steps: Issue an invoice into each selection.
    expected: Each request refuses the batch or unit and preserves the draft.
    negative: true
    data_needs: Provide a fiscal close's system batch.
    bound_to:
      - TST-ACC-BAT-074
      - TST-ACC-BAT-063
      - TST-ACC-BAT-026
    provenance: test
    source: >-
      services-accounting:modules/batches/tests/integration/services/close/system-batch-guard.integration.spec.js#refuses
      an invoice, a credit memo and a write-off naming the system batch (a
      transaction batch only, batch_not_open)
    category: validation
    test_evidence:
      - >-
        services-accounting:modules/batches/tests/integration/services/close/system-batch-guard.integration.spec.js#refuses
        an invoice, a credit memo and a write-off naming the system batch (a
        transaction batch only, batch_not_open)
      - >-
        services-accounting:modules/batches/tests/e2e/system-batches.e2e.spec.js#refuses
        issuing a draft into the system batch 409 batch_not_open, the draft left
        a draft
      - >-
        react-console:acceptance/accounting/playwright/journeys/batches-posting/ACT-ACC-0539.spec.ts#ACT-ACC-0539
  - id: ATS-ACC-BAT-007-02
    title: Errored intake differs between API and picker
    level: browser
    proves:
      - BR-CAP-ACC-BAT-007-02
    preconditions: The selected batch is Error.
    steps: Issue through the API with that batch and inspect the new-invoice picker.
    expected: The API accepts the assignment while the picker excludes the batch.
    negative: false
    data_needs: Provide an errored batch.
    bound_to:
      - TST-ACC-BAT-025
    provenance: test
    source: >-
      react-console:acceptance/accounting/playwright/journeys/batches-posting/ACT-ACC-0538.spec.ts#ACT-ACC-0538
    category: edge
    test_evidence:
      - >-
        react-console:acceptance/accounting/playwright/journeys/batches-posting/ACT-ACC-0538.spec.ts#ACT-ACC-0538
  - id: ATS-ACC-BAT-007-03
    title: Pro forma records cannot hold a batch
    level: api
    proves:
      - BR-CAP-ACC-BAT-007-03
    preconditions: No special setup is necessary.
    steps: Persist a pro forma invoice with a batch reference.
    expected: The database rejects the assignment.
    negative: true
    data_needs: Provide no fixtures beyond the stated setup.
    bound_to:
      - TST-ACC-BAT-084
      - TST-ACC-BAT-031
    provenance: test
    source: >-
      services-accounting:modules/batches/tests/integration/services/persistence/batch-totals.queries.integration.spec.js#is
      refused a batch by the database, so no batch’s totals can count one
    category: invariant
    test_evidence:
      - >-
        services-accounting:modules/batches/tests/integration/services/persistence/batch-totals.queries.integration.spec.js#is
        refused a batch by the database, so no batch’s totals can count one
      - >-
        react-console:acceptance/accounting/playwright/journeys/batches-posting/ACT-ACC-0552.spec.ts#ACT-ACC-0552
  - id: ATS-ACC-BAT-007-04
    title: Document moves protect posted batches
    level: browser
    proves:
      - BR-CAP-ACC-BAT-007-04
      - BR-CAP-ACC-BAT-007-05
      - INV-DOM-ACC-BAT-001-05
    preconditions: One unit has two Open batches and one Posted batch.
    steps: >-
      Move an invoice between the Open batches, then move a document out of
      Posted.
    expected: The first move succeeds; the database rejects the posted move.
    negative: true
    data_needs: Provide a posted batch with a document.
    bound_to:
      - TST-ACC-BAT-105
      - TST-ACC-BAT-025
    provenance: test
    source: >-
      services-accounting:modules/batches/tests/integration/services/posting/rebuilt-documents.integration.spec.js#refuses,
      in the database, moving a document out of a posted batch (RHA05)
    category: transition
    test_evidence:
      - >-
        services-accounting:modules/batches/tests/integration/services/posting/rebuilt-documents.integration.spec.js#refuses,
        in the database, moving a document out of a posted batch (RHA05)
      - >-
        react-console:acceptance/accounting/playwright/journeys/batches-posting/ACT-ACC-0538.spec.ts#ACT-ACC-0538
  - id: ATS-ACC-BAT-007-05
    title: Posted allocations are protected
    level: api
    proves:
      - BR-CAP-ACC-BAT-007-06
    preconditions: A posted payment exists and the unit has no assignment configuration.
    steps: Add an allocation in its posted batch and record another without a batch.
    expected: >-
      The database rejects the posted insertion and the unassigned allocation
      requires a batch.
    negative: true
    data_needs: Provide a posted payment batch.
    bound_to:
      - TST-ACC-BAT-106
    provenance: test
    source: >-
      services-accounting:modules/batches/tests/integration/services/posting/rebuilt-payments.integration.spec.js#refuses,
      in the database, an allocation row into the posted batch (RHA05)
    category: rule
    test_evidence:
      - >-
        services-accounting:modules/batches/tests/integration/services/posting/rebuilt-payments.integration.spec.js#refuses,
        in the database, an allocation row into the posted batch (RHA05)
      - >-
        services-accounting:modules/batches/tests/integration/services/posting/rebuilt-payments.integration.spec.js#refuses
        an allocation with no batch named when the payment’s batch is posted and
        the unit has no rule (batch_required)
  - id: ATS-ACC-BAT-007-06
    title: Voiding protects posted documents
    level: api
    proves:
      - BR-CAP-ACC-BAT-007-07
    preconditions: >-
      A Posted batch contains invoices, memos, payments and credits; another
      invoice remains unposted.
    steps: Void those documents.
    expected: >-
      Posted documents return the batch-not-open refusal; the unposted invoice
      can be voided.
    negative: true
    data_needs: Provide a posted batch.
    bound_to:
      - TST-ACC-BAT-102
      - TST-ACC-BAT-105
      - TST-ACC-BAT-106
    provenance: test
    source: >-
      services-accounting:modules/batches/tests/integration/services/posting/gl-resolution-at-posting.integration.spec.js#refuses
      voiding an invoice of a posted batch (batch_not_open), the invoice
      unchanged
    category: failure
    test_evidence:
      - >-
        services-accounting:modules/batches/tests/integration/services/posting/gl-resolution-at-posting.integration.spec.js#refuses
        voiding an invoice of a posted batch (batch_not_open), the invoice
        unchanged
      - >-
        services-accounting:modules/batches/tests/integration/services/posting/gl-resolution-at-posting.integration.spec.js#voids
        an invoice of an unposted batch with nothing applied
      - >-
        services-accounting:modules/batches/tests/integration/services/posting/rebuilt-documents.integration.spec.js#refuses
        the void of a credit memo whose batch is posted, batch_not_open
      - >-
        services-accounting:modules/batches/tests/integration/services/posting/rebuilt-payments.integration.spec.js#refuses
        the void of a posted payment, batch_not_open (M2 package 2: a void is a
        reversal, which must name an open batch)
      - >-
        services-accounting:modules/batches/tests/integration/services/posting/rebuilt-payments.integration.spec.js#refuses
        the void of the credit made from it, batch_not_open
  - id: ATS-ACC-BAT-007-07
    title: Amendment stops after posting
    level: browser
    proves:
      - BR-CAP-ACC-BAT-007-08
    preconditions: An issued invoice belongs to an Open batch.
    steps: 'Amend a line, post the batch and attempt another amendment.'
    expected: Posting uses the accepted revision; the later amendment fails.
    negative: true
    data_needs: Provide no fixtures beyond the stated setup.
    bound_to:
      - TST-ACC-BAT-031
    provenance: test
    source: >-
      react-console:acceptance/accounting/playwright/journeys/batches-posting/ACT-ACC-0552.spec.ts#ACT-ACC-0552
    category: transition
    test_evidence:
      - >-
        react-console:acceptance/accounting/playwright/journeys/batches-posting/ACT-ACC-0552.spec.ts#ACT-ACC-0552
  - id: ATS-ACC-BAT-007-08
    title: Date corrections stop after posting
    level: api
    proves:
      - BR-CAP-ACC-BAT-007-09
    preconditions: One memo remains in an Open batch and another belongs to Posted.
    steps: Change both document dates.
    expected: 'Only the unposted memo changes, together with its receivable facts.'
    negative: true
    data_needs: Provide no fixtures beyond the stated setup.
    bound_to: []
    provenance: proposed
    source: 'services-accounting:docs/architecture/accounting-2.0/02-decisions.md#A-7'
    category: boundary
    test_evidence: []
  - id: ATS-ACC-BAT-007-09
    title: Routing selection must pass intake checks
    category: interaction
    level: api
    proves:
      - BR-CAP-ACC-BAT-007-10
      - BR-CAP-ACC-BAT-011-09
    exercises:
      - CAP-ACC-BAT-007
      - CAP-ACC-BAT-011
    workflows:
      - WF-ACC-BAT-010
    preconditions: Routing selects Daily and its active batch is Closed.
    steps: >-
      Evaluate invoice facts and then issue an invoice without an explicit
      batch.
    expected: >-
      Evaluation identifies Daily; issuance refuses the Closed intake and saves
      no issued invoice.
    negative: true
    data_needs: >-
      An isolated workspace with the stated business-unit calendar, documents
      and configuration.
    bound_to: []
    provenance: proposed
    source: >-
      services-accounting:modules/batches/tests/integration/services/close/system-batch-guard.integration.spec.js#refuses
      the system batch as a default batch (BA-12);
      react-console:acceptance/accounting/playwright/journeys/batches-posting/ACT-ACC-0510.spec.ts#ACT-ACC-0510
  - id: ATS-ACC-BAT-007-10
    title: Posting freezes document placement
    category: interaction
    level: api
    proves:
      - BR-CAP-ACC-BAT-007-04
      - BR-CAP-ACC-BAT-013-03
    exercises:
      - CAP-ACC-BAT-007
      - CAP-ACC-BAT-013
    workflows: []
    preconditions: A draft invoice and two Open batches exist in one unit.
    steps: 'Issue into Morning, post Morning, then try to move the invoice to Evening.'
    expected: The move is refused and the invoice and its entry still identify Morning.
    negative: true
    data_needs: >-
      An isolated workspace with the stated business-unit calendar, documents
      and configuration.
    bound_to: []
    provenance: proposed
    source: >-
      services-accounting:modules/batches/tests/integration/services/posting/rebuilt-documents.integration.spec.js#refuses,
      in the database, moving a document out of a posted batch (RHA05);
      services-accounting:modules/batches/tests/e2e/batch-postings.e2e.spec.js#posts
      a batch as a durable job: the answer is the job, and the job posts the
      batch
  - id: ATS-ACC-BAT-007-11
    title: Recovery permits document reassignment
    category: interaction
    level: api
    proves:
      - BR-CAP-ACC-BAT-007-05
      - BR-CAP-ACC-BAT-016-06
    exercises:
      - CAP-ACC-BAT-007
      - CAP-ACC-BAT-016
    workflows: []
    preconditions: Morning is Posted with one invoice and Evening is Open in the same unit.
    steps: Unpost Morning and move its invoice to Evening.
    expected: Morning is Open without ledger entries and the invoice names Evening.
    negative: false
    data_needs: >-
      An isolated workspace with the stated business-unit calendar, documents
      and configuration.
    bound_to: []
    provenance: proposed
    source: >-
      react-console:acceptance/accounting/playwright/journeys/batches-posting/ACT-ACC-0538.spec.ts#ACT-ACC-0538;
      services-accounting:modules/batches/tests/e2e/batch-postings.e2e.spec.js#unposts
      a posted batch as a durable job: the batch is open again and its entries
      are deleted
  - id: ATS-ACC-BAT-007-12
    title: Reassignment requires the update grant in the console
    category: permission
    level: api
    proves:
      - BR-CAP-ACC-BAT-007-05
    preconditions: An invoice is in Open Morning and Open Evening belongs to the same unit.
    steps: Attempt reassignment in the console as a reader and as an updater.
    expected: >-
      The reader cannot submit reassignment; the updater moves the invoice to
      Evening.
    negative: true
    data_needs: >-
      Owned records in an isolated workspace with the stated calendar and
      accounting setup.
    bound_to: []
    provenance: proposed
    source: >-
      react-console:acceptance/accounting/playwright/journeys/batches-posting/ACT-ACC-0538.spec.ts#ACT-ACC-0538
evidence:
  - services-accounting at f47cb263: 'Inspected references: scenario-bound tests in modules/batches/tests.'
  - react-console at baf6dae3: >-
      Inspected references:
      acceptance/accounting/playwright/journeys/batches-posting (ACT-ACC-0538,
      0552).
  - >-
    Pinned design objects, state models and workflows identify invariant and
    interaction obligations; scenario test anchors remain in test_evidence.
product_intent: proposed
coverage:
  rule: covered
  transition: not-applicable
  validation: covered
  permission: 'gap: FND-ACC-BAT-061'
  edge: covered
  failure: covered
  boundary: covered
  concurrency: 'gap: FND-ACC-BAT-061'
  invariant: covered
  interaction: covered
coverage_notes:
  permission: >-
    Batch-update authorization during reassignment, concurrent intake versus
    posting, and complete enforcement of immutable issued-document values
    require cross-module proof.
  concurrency: >-
    Batch-update authorization during reassignment, concurrent intake versus
    posting, and complete enforcement of immutable issued-document values
    require cross-module proof.
  transition: >-
    This capability has no independent lifecycle transition; state changes
    belong to the related lifecycle, posting or fiscal capability.
rule_coverage:
  - rule: BR-CAP-ACC-BAT-007-01
    scenarios:
      - ATS-ACC-BAT-007-01
    provenance: proposed
    source: >-
      services-accounting:modules/batches/tests/integration/services/close/system-batch-guard.integration.spec.js#refuses
      an invoice, a credit memo and a write-off naming the system batch (a
      transaction batch only, batch_not_open)
  - rule: BR-CAP-ACC-BAT-007-02
    scenarios:
      - ATS-ACC-BAT-007-02
    provenance: proposed
    source: >-
      services-accounting:modules/batches/services/rules/batch-rules.ts:BATCH_ACCEPTING_STATUSES
  - rule: BR-CAP-ACC-BAT-007-03
    scenarios:
      - ATS-ACC-BAT-007-03
    provenance: proposed
    source: >-
      services-accounting:modules/batches/tests/integration/services/persistence/batch-totals.queries.integration.spec.js#is
      refused a batch by the database, so no batch’s totals can count one
  - rule: BR-CAP-ACC-BAT-007-04
    scenarios:
      - ATS-ACC-BAT-007-04
      - ATS-ACC-BAT-007-10
    provenance: proposed
    source: >-
      services-accounting:modules/batches/tests/integration/services/posting/rebuilt-documents.integration.spec.js#refuses,
      in the database, moving a document out of a posted batch (RHA05)
  - rule: BR-CAP-ACC-BAT-007-05
    scenarios:
      - ATS-ACC-BAT-007-04
      - ATS-ACC-BAT-007-11
      - ATS-ACC-BAT-007-12
    provenance: proposed
    source: >-
      react-console:acceptance/accounting/playwright/journeys/batches-posting/ACT-ACC-0538.spec.ts#ACT-ACC-0538
  - rule: BR-CAP-ACC-BAT-007-06
    scenarios:
      - ATS-ACC-BAT-007-05
    provenance: proposed
    source: >-
      services-accounting:modules/batches/tests/integration/services/posting/rebuilt-payments.integration.spec.js#refuses,
      in the database, an allocation row into the posted batch (RHA05)
  - rule: BR-CAP-ACC-BAT-007-07
    scenarios:
      - ATS-ACC-BAT-007-06
    provenance: proposed
    source: >-
      services-accounting:modules/batches/tests/integration/services/posting/gl-resolution-at-posting.integration.spec.js#refuses
      voiding an invoice of a posted batch (batch_not_open), the invoice
      unchanged
  - rule: BR-CAP-ACC-BAT-007-08
    scenarios:
      - ATS-ACC-BAT-007-07
    provenance: proposed
    source: >-
      react-console:acceptance/accounting/playwright/journeys/batches-posting/ACT-ACC-0552.spec.ts#ACT-ACC-0552
  - rule: BR-CAP-ACC-BAT-007-09
    scenarios:
      - ATS-ACC-BAT-007-08
    provenance: proposed
    source: 'services-accounting:docs/architecture/accounting-2.0/02-decisions.md#A-7'
  - rule: BR-CAP-ACC-BAT-007-10
    scenarios:
      - ATS-ACC-BAT-007-01
      - ATS-ACC-BAT-007-09
    provenance: proposed
    source: >-
      services-accounting:modules/batches/tests/integration/services/close/system-batch-guard.integration.spec.js#refuses
      the system batch as a default batch (BA-12)
transition_coverage: []
permission_coverage:
  - key: accounting.batches.update
    surface: console
    scenarios: []
    gap: FND-ACC-BAT-061
    provenance: unknown
    source: FND-ACC-BAT-061
    note: >-
      An aggregate persona check does not establish exhaustive allow and deny
      proof for every named surface.
executable_coverage:
  bound_scenarios: 7
  unbound_scenarios:
    - ATS-ACC-BAT-007-08
    - ATS-ACC-BAT-007-09
    - ATS-ACC-BAT-007-10
    - ATS-ACC-BAT-007-11
    - ATS-ACC-BAT-007-12
  gap: FND-ACC-BAT-061
---

# Place documents in eligible batches and protect posted work: Capability Test Specification

## Coverage

The scenarios define focused checks for this outcome. The coverage map distinguishes specified checks from unresolved proof; executable bindings identify inspected assertions and carry no execution result.

| Rule | Proof Specification or Gap |
|---|---|
| `BR-CAP-ACC-BAT-007-01` | `ATS-ACC-BAT-007-01` |
| `BR-CAP-ACC-BAT-007-02` | `ATS-ACC-BAT-007-02` |
| `BR-CAP-ACC-BAT-007-03` | `ATS-ACC-BAT-007-03` |
| `BR-CAP-ACC-BAT-007-04` | `ATS-ACC-BAT-007-04`, `ATS-ACC-BAT-007-10` |
| `BR-CAP-ACC-BAT-007-05` | `ATS-ACC-BAT-007-04`, `ATS-ACC-BAT-007-11`, `ATS-ACC-BAT-007-12` |
| `BR-CAP-ACC-BAT-007-06` | `ATS-ACC-BAT-007-05` |
| `BR-CAP-ACC-BAT-007-07` | `ATS-ACC-BAT-007-06` |
| `BR-CAP-ACC-BAT-007-08` | `ATS-ACC-BAT-007-07` |
| `BR-CAP-ACC-BAT-007-09` | `ATS-ACC-BAT-007-08` |
| `BR-CAP-ACC-BAT-007-10` | `ATS-ACC-BAT-007-01`, `ATS-ACC-BAT-007-09` |

## Interactions With Related Capabilities

Routing selection must pass intake checks. Posting freezes document placement. Recovery permits document reassignment. These checks use the related capability’s outcome as part of the setup or verification. Unbound interactions remain proposed until a suite executes the complete chain.
