---
id: ATS-ACC-BAT-002
scope: CAP-ACC-BAT-002
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-002-01
    title: Read access controls the page and action endpoint
    level: browser
    proves:
      - BR-CAP-ACC-BAT-002-01
    preconditions: One persona can read batches and another cannot.
    steps: Open the batch list and request actions as each persona.
    expected: >-
      The denied persona receives the access page and 403; the reader receives
      the list.
    negative: true
    data_needs: 'Provide the acceptance personas, including the reconciliation preparer.'
    bound_to:
      - TST-ACC-BAT-055
      - TST-ACC-BAT-060
      - TST-ACC-BAT-027
    provenance: test
    source: >-
      services-accounting:modules/batches/tests/e2e/batch-actions.e2e.spec.js#refuses
      a caller without accounting.batches.read 403
    category: permission
    test_evidence:
      - >-
        services-accounting:modules/batches/tests/e2e/batch-actions.e2e.spec.js#refuses
        a caller without accounting.batches.read 403
      - >-
        services-accounting:modules/batches/tests/e2e/batches.e2e.spec.js#lets a
        caller with accounting.batches.read list
      - >-
        react-console:acceptance/accounting/playwright/journeys/batches-posting/ACT-ACC-0540.spec.ts#ACT-ACC-0540
  - id: ATS-ACC-BAT-002-02
    title: Filtering and cursors preserve ordering
    level: api
    proves:
      - BR-CAP-ACC-BAT-002-02
    preconditions: Two units each have batches in two fiscal periods.
    steps: >-
      Apply the unit, status and period filters and follow a cursor; omit the
      year on a period filter.
    expected: >-
      Results sort by date then reference; a period without its year returns
      400.
    negative: true
    data_needs: Provide seeded batches.
    bound_to:
      - TST-ACC-BAT-086
      - TST-ACC-BAT-060
    provenance: test
    source: >-
      services-accounting:modules/batches/tests/e2e/batches.e2e.spec.js#refuses
      a fiscal_period filter without its fiscal_year_id 400
    category: boundary
    test_evidence:
      - >-
        services-accounting:modules/batches/tests/integration/services/persistence/batches.queries.integration.spec.js#lists
        a unit’s batches by date, then id
      - >-
        services-accounting:modules/batches/tests/integration/services/persistence/batches.queries.integration.spec.js#lists
        a unit’s batches of one status
      - >-
        services-accounting:modules/batches/tests/integration/services/persistence/batches.queries.integration.spec.js#lists
        a fiscal period’s batches
      - >-
        services-accounting:modules/batches/tests/integration/services/persistence/batches.queries.integration.spec.js#answers
        a page with more to follow, then the page after it
      - >-
        services-accounting:modules/batches/tests/e2e/batches.e2e.spec.js#refuses
        a fiscal_period filter without its fiscal_year_id 400
  - id: ATS-ACC-BAT-002-03
    title: Totals follow current documents
    level: api
    proves:
      - BR-CAP-ACC-BAT-002-03
      - BR-CAP-ACC-BAT-002-05
    preconditions: An Open batch contains several document kinds.
    steps: Retrieve that batch directly and through the list.
    expected: >-
      Counts and amounts agree with the documents, including payment, refund and
      net-cash totals.
    negative: false
    data_needs: Provide the batch totals fixtures.
    bound_to:
      - TST-ACC-BAT-084
      - TST-ACC-BAT-058
    provenance: test
    source: >-
      services-accounting:modules/batches/tests/integration/services/persistence/batch-totals.queries.integration.spec.js#counts
      exactly the real transactions of every kind and sums their amounts
    category: rule
    test_evidence:
      - >-
        services-accounting:modules/batches/tests/integration/services/persistence/batch-totals.queries.integration.spec.js#counts
        exactly the real transactions of every kind and sums their amounts
      - >-
        services-accounting:modules/batches/tests/integration/services/persistence/batch-totals.queries.integration.spec.js#answers
        an empty batch’s record with every kind at 0
      - >-
        services-accounting:modules/batches/tests/e2e/batch-totals.e2e.spec.js#reads
        the batch with its live totals
      - >-
        services-accounting:modules/batches/tests/e2e/batch-totals.e2e.spec.js#lists
        each batch with its own totals
  - id: ATS-ACC-BAT-002-04
    title: Excluded documents contribute nothing
    level: api
    proves:
      - BR-CAP-ACC-BAT-002-04
    preconditions: >-
      The batch contains voided invoices and payments and a reversed write-off
      with its reversal.
    steps: Retrieve the batch’s totals.
    expected: >-
      Those records add nothing; a pro forma invoice cannot be assigned to the
      batch.
    negative: true
    data_needs: Provide the batch totals fixtures.
    bound_to:
      - TST-ACC-BAT-084
    provenance: test
    source: >-
      services-accounting:modules/batches/tests/integration/services/persistence/batch-totals.queries.integration.spec.js#leaves
      a reversal out of its own batch, and answers minor units as major units to
      two decimals
    category: edge
    test_evidence:
      - >-
        services-accounting:modules/batches/tests/integration/services/persistence/batch-totals.queries.integration.spec.js#leaves
        a reversal out of its own batch, and answers minor units as major units
        to two decimals
      - >-
        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
      - >-
        services-accounting:modules/batches/tests/integration/services/persistence/batch-totals.queries.integration.spec.js#counts
        exactly the real transactions of every kind and sums their amounts
  - id: ATS-ACC-BAT-002-05
    title: Workspace isolation hides batch existence
    level: api
    proves:
      - BR-CAP-ACC-BAT-002-06
      - INV-DOM-ACC-BAT-001-12
    preconditions: Only the first workspace owns the batch.
    steps: 'From the second workspace, request its record, actions and list.'
    expected: The record and actions return 404 and the list omits it.
    negative: true
    data_needs: Provide two workspaces.
    bound_to:
      - TST-ACC-BAT-086
      - TST-ACC-BAT-055
      - TST-ACC-BAT-028
    provenance: test
    source: >-
      services-accounting:modules/batches/tests/integration/services/persistence/batches.queries.integration.spec.js#reads
      another tenant’s batch as absent
    category: invariant
    test_evidence:
      - >-
        services-accounting:modules/batches/tests/integration/services/persistence/batches.queries.integration.spec.js#reads
        another tenant’s batch as absent
      - >-
        services-accounting:modules/batches/tests/e2e/batch-actions.e2e.spec.js#refuses
        the actions of a batch the tenant does not have 404
      - >-
        react-console:acceptance/accounting/playwright/journeys/batches-posting/ACT-ACC-0541.spec.ts#ACT-ACC-0541
  - id: ATS-ACC-BAT-002-06
    title: Dependents include indirect relationships
    level: api
    proves:
      - BR-CAP-ACC-BAT-002-07
    preconditions: 'A posted October batch supports November, which supports December.'
    steps: Request October’s dependents and separately submit an empty selection.
    expected: >-
      Both downstream batches return with their identifying details; the empty
      selection returns 400.
    negative: true
    data_needs: Provide three dependent batches.
    bound_to:
      - TST-ACC-BAT-086
      - TST-ACC-BAT-060
    provenance: test
    source: >-
      services-accounting:modules/batches/tests/integration/services/persistence/batches.queries.integration.spec.js#answers
      the posted and downloaded batches depending on those named, through
      others, with their id, name, date and status
    category: rule
    test_evidence:
      - >-
        services-accounting:modules/batches/tests/integration/services/persistence/batches.queries.integration.spec.js#answers
        the posted and downloaded batches depending on those named, through
        others, with their id, name, date and status
      - >-
        services-accounting:modules/batches/tests/integration/services/persistence/batches.queries.integration.spec.js#answers
        none for a batch nothing depends on
      - >-
        services-accounting:modules/batches/tests/e2e/batches.e2e.spec.js#refuses
        a dependents request naming no batch 400
  - id: ATS-ACC-BAT-002-07
    title: Dependency traversal has bounded work
    level: api
    proves:
      - BR-CAP-ACC-BAT-002-09
    preconditions: Existing batches form a dependency graph.
    steps: >-
      Submit 101 starting references and a traversal exceeding one thousand
      references.
    expected: Both requests fail at their respective limits.
    negative: true
    data_needs: Provide fixtures appropriate to the stated accounting context.
    bound_to: []
    provenance: proposed
    source: >-
      services-accounting:modules/batches/services/persistence/batches.ts:dependentBatchesOf;
      services-accounting:modules/batches/services/rules/batch-rules.ts:dependentBatchesOf
    category: boundary
    test_evidence: []
  - id: ATS-ACC-BAT-002-08
    title: Recorded posting is distinguishable from live intake
    category: interaction
    level: api
    proves:
      - BR-CAP-ACC-BAT-002-03
      - BR-CAP-ACC-BAT-013-11
    exercises:
      - CAP-ACC-BAT-002
      - CAP-ACC-BAT-013
    workflows: []
    preconditions: One batch holds an issued invoice and an unvoided payment.
    steps: >-
      Read its live totals, post it, then read its recorded statistics and
      current totals.
    expected: >-
      The same reference is Posted with recorded posting time; live totals and
      recorded statistics can be inspected separately.
    negative: false
    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/persistence/batch-totals.queries.integration.spec.js#counts
      exactly the real transactions of every kind and sums their amounts;
      services-accounting:modules/batches/tests/integration/services/posting/rebuilt-documents.integration.spec.js#records
      the batch's statistics: the documents counted by kind and their base
      totals
  - id: ATS-ACC-BAT-002-09
    title: Recovery changes dependent lookup
    category: interaction
    level: api
    proves:
      - BR-CAP-ACC-BAT-002-07
      - BR-CAP-ACC-BAT-016-06
    exercises:
      - CAP-ACC-BAT-002
      - CAP-ACC-BAT-016
    workflows: []
    preconditions: October has a Posted November dependent.
    steps: 'Look up October’s dependents, recover November, then repeat the lookup.'
    expected: >-
      November appears before recovery and is absent from the posted-dependent
      result afterward.
    negative: false
    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/persistence/batches.queries.integration.spec.js#answers
      the posted and downloaded batches depending on those named, through
      others, with their id, name, date and status;
      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-002-10
    title: Batch reporting preserves readable numbers
    category: rule
    level: api
    proves:
      - BR-CAP-ACC-BAT-002-08
    preconditions: >-
      Two isolated batches have names Morning and Evening; only Morning has code
      DAY-1.
    steps: Read the Batches dataset as its workspace query reader.
    expected: >-
      The numbers are DAY-1 and Evening respectively and transaction-batch links
      identify their original collections.
    negative: false
    data_needs: >-
      Owned records in an isolated workspace with the stated calendar and
      accounting setup.
    bound_to:
      - TST-ACC-BAT-065
    provenance: test
    source: >-
      services-accounting:modules/batches/tests/integration/db/batches-view.integration.spec.js#answers
      the reader of tenant A its batches, with every column, the number the code
      else the name
    test_evidence:
      - >-
        services-accounting:modules/batches/tests/integration/db/batches-view.integration.spec.js#answers
        the reader of tenant A its batches, with every column, the number the
        code else the name
  - id: ATS-ACC-BAT-002-11
    title: Batch dataset access needs its query grant
    category: permission
    level: api
    proves:
      - BR-CAP-ACC-BAT-002-08
    preconditions: Two callers differ only in their batch-query grant.
    steps: Request the Batches dataset as both callers.
    expected: >-
      The permitted request succeeds and the other is denied before rows are
      returned.
    negative: true
    data_needs: >-
      Owned records in an isolated workspace with the stated calendar and
      accounting setup.
    bound_to: []
    provenance: proposed
    source: >-
      services-accounting:modules/batches/tests/integration/db/batches-view.integration.spec.js#answers
      the reader of tenant A its batches, with every column, the number the code
      else the name
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-0540,
      0541).
  - >-
    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: 'gap: FND-ACC-BAT-056'
  permission: 'gap: FND-ACC-BAT-056'
  edge: covered
  failure: 'gap: FND-ACC-BAT-056'
  boundary: covered
  concurrency: 'gap: FND-ACC-BAT-056'
  invariant: covered
  interaction: covered
coverage_notes:
  transition: >-
    This capability reads existing collections and dependency projections; it
    defines no lifecycle transition.
  validation: >-
    Dataset permission evaluation, exact page limits, read failures, and
    concurrent document changes during totals and dependency reads remain
    unproved.
  failure: >-
    Dataset permission evaluation, exact page limits, read failures, and
    concurrent document changes during totals and dependency reads remain
    unproved.
  concurrency: >-
    Dataset permission evaluation, exact page limits, read failures, and
    concurrent document changes during totals and dependency reads remain
    unproved.
rule_coverage:
  - rule: BR-CAP-ACC-BAT-002-01
    scenarios:
      - ATS-ACC-BAT-002-01
    provenance: proposed
    source: >-
      services-accounting:modules/batches/tests/e2e/batch-actions.e2e.spec.js#refuses
      a caller without accounting.batches.read 403
  - rule: BR-CAP-ACC-BAT-002-02
    scenarios:
      - ATS-ACC-BAT-002-02
    provenance: proposed
    source: >-
      services-accounting:modules/batches/tests/e2e/batches.e2e.spec.js#refuses
      a fiscal_period filter without its fiscal_year_id 400
  - rule: BR-CAP-ACC-BAT-002-03
    scenarios:
      - ATS-ACC-BAT-002-03
      - ATS-ACC-BAT-002-08
    provenance: proposed
    source: >-
      services-accounting:modules/batches/tests/integration/services/persistence/batch-totals.queries.integration.spec.js#counts
      exactly the real transactions of every kind and sums their amounts
  - rule: BR-CAP-ACC-BAT-002-04
    scenarios:
      - ATS-ACC-BAT-002-04
    provenance: proposed
    source: >-
      services-accounting:modules/batches/tests/integration/services/persistence/batch-totals.queries.integration.spec.js#leaves
      a reversal out of its own batch, and answers minor units as major units to
      two decimals
  - rule: BR-CAP-ACC-BAT-002-05
    scenarios:
      - ATS-ACC-BAT-002-03
    provenance: proposed
    source: >-
      services-accounting:modules/batches/services/persistence/batch-totals.ts:batchTotalsStatement
  - rule: BR-CAP-ACC-BAT-002-06
    scenarios:
      - ATS-ACC-BAT-002-05
    provenance: proposed
    source: >-
      services-accounting:modules/batches/tests/integration/services/persistence/batches.queries.integration.spec.js#reads
      another tenant’s batch as absent
  - rule: BR-CAP-ACC-BAT-002-07
    scenarios:
      - ATS-ACC-BAT-002-06
      - ATS-ACC-BAT-002-09
    provenance: proposed
    source: >-
      services-accounting:modules/batches/tests/integration/services/persistence/batches.queries.integration.spec.js#answers
      the posted and downloaded batches depending on those named, through
      others, with their id, name, date and status
  - rule: BR-CAP-ACC-BAT-002-08
    scenarios:
      - ATS-ACC-BAT-002-10
      - ATS-ACC-BAT-002-11
    provenance: proposed
    source: >-
      services-accounting:modules/batches/tests/integration/db/batches-view.integration.spec.js#answers
      the reader of tenant A its batches, with every column, the number the code
      else the name
  - rule: BR-CAP-ACC-BAT-002-09
    scenarios:
      - ATS-ACC-BAT-002-07
    provenance: proposed
    source: >-
      services-accounting:modules/batches/services/persistence/batches.ts:dependentBatchesOf;
      services-accounting:modules/batches/services/rules/batch-rules.ts:dependentBatchesOf
transition_coverage: []
permission_coverage:
  - key: accounting.batches.read
    surface: api
    scenarios:
      - ATS-ACC-BAT-002-01
    gap: FND-ACC-BAT-056
    provenance: unknown
    source: FND-ACC-BAT-056
    note: >-
      An aggregate persona check does not establish exhaustive allow and deny
      proof for every named surface.
  - key: accounting.batches.read
    surface: console
    scenarios:
      - ATS-ACC-BAT-002-01
    gap: FND-ACC-BAT-056
    provenance: unknown
    source: FND-ACC-BAT-056
    note: >-
      An aggregate persona check does not establish exhaustive allow and deny
      proof for every named surface.
  - key: accounting.batches.query
    surface: service
    scenarios:
      - ATS-ACC-BAT-002-01
    gap: FND-ACC-BAT-056
    provenance: unknown
    source: FND-ACC-BAT-056
    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-002-07
    - ATS-ACC-BAT-002-08
    - ATS-ACC-BAT-002-09
    - ATS-ACC-BAT-002-11
  gap: FND-ACC-BAT-056
---

# Locate batches and inspect their current contents: 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-002-01` | `ATS-ACC-BAT-002-01` |
| `BR-CAP-ACC-BAT-002-02` | `ATS-ACC-BAT-002-02` |
| `BR-CAP-ACC-BAT-002-03` | `ATS-ACC-BAT-002-03`, `ATS-ACC-BAT-002-08` |
| `BR-CAP-ACC-BAT-002-04` | `ATS-ACC-BAT-002-04` |
| `BR-CAP-ACC-BAT-002-05` | `ATS-ACC-BAT-002-03` |
| `BR-CAP-ACC-BAT-002-06` | `ATS-ACC-BAT-002-05` |
| `BR-CAP-ACC-BAT-002-07` | `ATS-ACC-BAT-002-06`, `ATS-ACC-BAT-002-09` |
| `BR-CAP-ACC-BAT-002-08` | `ATS-ACC-BAT-002-10`, `ATS-ACC-BAT-002-11` |
| `BR-CAP-ACC-BAT-002-09` | `ATS-ACC-BAT-002-07` |

## Interactions With Related Capabilities

Recorded posting is distinguishable from live intake. Recovery changes dependent lookup. 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.
