---
id: ATS-ACC-BAT-018
scope: CAP-ACC-BAT-018
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-018-01
    title: Entry listing checks read access
    level: api
    proves:
      - BR-CAP-ACC-BAT-018-01
    preconditions: The caller lacks entry-read permission.
    steps: Request the entry list.
    expected: The request returns 403.
    negative: true
    data_needs: Provide security fixtures.
    bound_to:
      - TST-ACC-BAT-062
    provenance: test
    source: >-
      services-accounting:modules/batches/tests/e2e/subledger-entries.e2e.spec.js#refuses
      a caller without the subledger entries read permission, 403
    category: permission
    test_evidence:
      - >-
        services-accounting:modules/batches/tests/e2e/subledger-entries.e2e.spec.js#refuses
        a caller without the subledger entries read permission, 403
  - id: ATS-ACC-BAT-018-02
    title: Filters and page sizes are bounded
    level: api
    proves:
      - BR-CAP-ACC-BAT-018-02
    preconditions: 'Entries span several accounts, units and dates.'
    steps: >-
      Apply each filter and pagination, then submit zero, oversized and
      invalid-date values.
    expected: >-
      Valid filters return matching entries in pages up to two hundred; invalid
      inputs return field-specific 400 errors.
    negative: true
    data_needs: Provide no fixtures beyond the stated setup.
    bound_to:
      - TST-ACC-BAT-094
      - TST-ACC-BAT-062
      - TST-ACC-BAT-123
      - TST-ACC-BAT-029
    provenance: test
    source: >-
      services-accounting:modules/batches/tests/e2e/subledger-entries.e2e.spec.js#refuses
      from_date=2026-13-01 with a 400 naming the date, not a 500 (DEF-ACT-0507)
    category: boundary
    test_evidence:
      - >-
        services-accounting:modules/batches/tests/integration/services/persistence/subledger-entries.queries.integration.spec.js#lists
        the entries holding a line of the G/L account, and none for an account
        they do not hold
      - >-
        services-accounting:modules/batches/tests/integration/services/persistence/subledger-entries.queries.integration.spec.js#lists
        the entries of the business unit within the dates, and none outside them
      - >-
        services-accounting:modules/batches/tests/integration/services/persistence/subledger-entries.queries.integration.spec.js#pages
        the list with a limit and an offset
      - >-
        services-accounting:modules/batches/tests/e2e/subledger-entries.e2e.spec.js#refuses
        limit=201 with a 400 naming the field (DEF-ACT-0507)
      - >-
        services-accounting:modules/batches/tests/e2e/subledger-entries.e2e.spec.js#refuses
        from_date=2026-13-01 with a 400 naming the date, not a 500
        (DEF-ACT-0507)
      - >-
        services-accounting:modules/batches/tests/unit/defects/subledger-entry-list-query.spec.js#refuses
        a negative offset, naming the field
      - >-
        react-console:acceptance/accounting/playwright/journeys/batches-posting/ACT-ACC-0547.spec.ts#ACT-ACC-0547
  - id: ATS-ACC-BAT-018-03
    title: Detail and list expose the same entry
    level: api
    proves:
      - BR-CAP-ACC-BAT-018-03
    preconditions: An invoice has posted.
    steps: List its batch’s entries and retrieve its detail.
    expected: 'Both expose matching ordered lines, money values and the document number.'
    negative: false
    data_needs: Provide no fixtures beyond the stated setup.
    bound_to:
      - TST-ACC-BAT-062
    provenance: test
    source: >-
      services-accounting:modules/batches/tests/e2e/subledger-entries.e2e.spec.js#names
      the number of the document each entry posts, never its id (DEF-ACT-0531)
    category: rule
    test_evidence:
      - >-
        services-accounting:modules/batches/tests/e2e/subledger-entries.e2e.spec.js#lists
        the entries of the batch, each with its lines
      - >-
        services-accounting:modules/batches/tests/e2e/subledger-entries.e2e.spec.js#names
        the number of the document each entry posts, never its id (DEF-ACT-0531)
      - >-
        services-accounting:modules/batches/tests/e2e/subledger-entries.e2e.spec.js#reads
        one entry by its id, with the same header and lines as the list (the
        amounts as Money on the wire)
  - id: ATS-ACC-BAT-018-04
    title: Reversed system entries are opt-in
    level: api
    proves:
      - BR-CAP-ACC-BAT-018-04
    preconditions: An ordinary batch was unposted and a close posting was reversed.
    steps: List with and without reversed entries.
    expected: >-
      Ordinary unposting leaves no rows in either view; system reversal history
      appears when requested.
    negative: false
    data_needs: Provide a fiscal close and reopen.
    bound_to:
      - TST-ACC-BAT-094
    provenance: test
    source: >-
      services-accounting:modules/batches/tests/integration/services/persistence/subledger-entries.queries.integration.spec.js#lists
      no entry when history is asked for either: nothing is written as a
      reversal
    category: interaction
    test_evidence:
      - >-
        services-accounting:modules/batches/tests/integration/services/persistence/subledger-entries.queries.integration.spec.js#lists
        no current entry of the batch once it is unposted
      - >-
        services-accounting:modules/batches/tests/integration/services/persistence/subledger-entries.queries.integration.spec.js#lists
        no entry when history is asked for either: nothing is written as a
        reversal
      - >-
        services-accounting:modules/batches/tests/integration/services/persistence/subledger-entries.queries.integration.spec.js#reads
        the posting's original entries only, by id, with their lines, once it is
        reversed
  - id: ATS-ACC-BAT-018-05
    title: Missing and foreign entries are indistinguishable
    level: api
    proves:
      - BR-CAP-ACC-BAT-018-05
      - INV-DOM-ACC-BAT-004-08
    preconditions: An entry belongs to another workspace.
    steps: Read that reference and a nonexistent reference.
    expected: Both return the same 404 response type.
    negative: true
    data_needs: Provide two workspaces.
    bound_to:
      - TST-ACC-BAT-062
    provenance: test
    source: >-
      services-accounting:modules/batches/tests/e2e/subledger-entries.e2e.spec.js#answers
      an entry of another tenant as it answers an absent one: the same status
      and error type
    category: invariant
    test_evidence:
      - >-
        services-accounting:modules/batches/tests/e2e/subledger-entries.e2e.spec.js#answers
        an entry of another tenant as it answers an absent one: the same status
        and error type
  - id: ATS-ACC-BAT-018-06
    title: Reporting exposes line-level ledger values
    level: api
    proves:
      - BR-CAP-ACC-BAT-018-06
      - BR-CAP-ACC-BAT-018-07
    preconditions: >-
      Several months contain all document kinds, including reversed system
      history.
    steps: Query as authorized readers in two workspaces.
    expected: >-
      Each reader receives only their own lines with base currency, unit,
      document numbers and reversal flags.
    negative: true
    data_needs: Provide the view fixtures.
    bound_to:
      - TST-ACC-BAT-068
    provenance: test
    source: >-
      services-accounting:modules/batches/tests/integration/db/subledger-entry-lines-view.integration.spec.js#answers
      the unit’s name and its base currency on every row (Reporting D6): the
      currency of debits and credits, not the document’s
    category: rule
    test_evidence:
      - >-
        services-accounting:modules/batches/tests/integration/db/subledger-entry-lines-view.integration.spec.js#answers
        one row per line of tenant A’s entries, its id the entry and the
        position
      - >-
        services-accounting:modules/batches/tests/integration/db/subledger-entry-lines-view.integration.spec.js#answers
        the unit’s name and its base currency on every row (Reporting D6): the
        currency of debits and credits, not the document’s
      - >-
        services-accounting:modules/batches/tests/integration/db/subledger-entry-lines-view.integration.spec.js#flags
        exactly the reversals’ lines, each the mirror of its original’s line at
        the same position
      - >-
        services-accounting:modules/batches/tests/integration/db/subledger-entry-lines-view.integration.spec.js#answers
        tenant B’s reader its own invoice’s lines alone
  - id: ATS-ACC-BAT-018-07
    title: Recovery leaves history without ordinary entries
    category: interaction
    level: api
    proves:
      - BR-CAP-ACC-BAT-016-03
      - BR-CAP-ACC-BAT-018-04
    exercises:
      - CAP-ACC-BAT-018
      - CAP-ACC-BAT-016
    workflows: []
    preconditions: Morning is Posted and has a visible ledger entry.
    steps: Unpost Morning and list its entries with and without history.
    expected: >-
      Both entry lists are empty while posting history retains the retired
      generation.
    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/posting/unpost-deletes-entries.integration.spec.js#deletes
      the batch’s entries and their lines, and tells how many entries;
      services-accounting:modules/batches/tests/integration/services/persistence/subledger-entries.queries.integration.spec.js#lists
      no entry when history is asked for either: nothing is written as a
      reversal
  - id: ATS-ACC-BAT-018-08
    title: Immutable accounting remains readable
    category: interaction
    level: api
    proves:
      - BR-CAP-ACC-BAT-017-03
      - BR-CAP-ACC-BAT-018-03
    exercises:
      - CAP-ACC-BAT-018
      - CAP-ACC-BAT-017
    workflows: []
    preconditions: A posted invoice entry is visible to its workspace reader.
    steps: 'Read its detail, attempt an ordinary ledger mutation and read it again.'
    expected: Mutation fails and the second detail agrees with the first.
    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/persistence/subledger-entries.integration.spec.js#cannot
      be updated even by the table owner: the append-only trigger refuses it,
      naming the table;
      services-accounting:modules/batches/tests/e2e/subledger-entries.e2e.spec.js#names
      the number of the document each entry posts, never its id (DEF-ACT-0531)
  - id: ATS-ACC-BAT-018-09
    title: Entry offsets and dates reject malformed input
    category: validation
    level: api
    proves:
      - BR-CAP-ACC-BAT-018-02
    preconditions: An isolated posted batch has readable ledger entries.
    steps: List with a negative offset and an impossible calendar date.
    expected: >-
      Both requests return field-specific 400 refusals and leave accounting
      unchanged.
    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/e2e/subledger-entries.e2e.spec.js#refuses
      from_date=2026-13-01 with a 400 naming the date, not a 500 (DEF-ACT-0507)
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-0547.spec.ts.
  - >-
    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-072'
  edge: 'gap: FND-ACC-BAT-072'
  failure: 'gap: FND-ACC-BAT-072'
  boundary: covered
  concurrency: 'gap: FND-ACC-BAT-072'
  invariant: covered
  interaction: covered
coverage_notes:
  transition: >-
    Entry retrieval and dataset reading define no persistent lifecycle
    transition.
  validation: >-
    Dataset permission evaluation, concurrent recovery during reads, query
    failure and exact console loading caps require focused proof.
  edge: >-
    Dataset permission evaluation, concurrent recovery during reads, query
    failure and exact console loading caps require focused proof.
  failure: >-
    Dataset permission evaluation, concurrent recovery during reads, query
    failure and exact console loading caps require focused proof.
  concurrency: >-
    Dataset permission evaluation, concurrent recovery during reads, query
    failure and exact console loading caps require focused proof.
rule_coverage:
  - rule: BR-CAP-ACC-BAT-018-01
    scenarios:
      - ATS-ACC-BAT-018-01
    provenance: proposed
    source: >-
      services-accounting:modules/batches/tests/e2e/subledger-entries.e2e.spec.js#refuses
      a caller without the subledger entries read permission, 403
  - rule: BR-CAP-ACC-BAT-018-02
    scenarios:
      - ATS-ACC-BAT-018-02
      - ATS-ACC-BAT-018-09
    provenance: proposed
    source: >-
      services-accounting:modules/batches/tests/e2e/subledger-entries.e2e.spec.js#refuses
      from_date=2026-13-01 with a 400 naming the date, not a 500 (DEF-ACT-0507)
  - rule: BR-CAP-ACC-BAT-018-03
    scenarios:
      - ATS-ACC-BAT-018-03
      - ATS-ACC-BAT-018-08
    provenance: proposed
    source: >-
      services-accounting:modules/batches/tests/e2e/subledger-entries.e2e.spec.js#names
      the number of the document each entry posts, never its id (DEF-ACT-0531)
  - rule: BR-CAP-ACC-BAT-018-04
    scenarios:
      - ATS-ACC-BAT-018-04
      - ATS-ACC-BAT-018-07
    provenance: proposed
    source: >-
      services-accounting:modules/batches/tests/integration/services/persistence/subledger-entries.queries.integration.spec.js#lists
      no entry when history is asked for either: nothing is written as a
      reversal
  - rule: BR-CAP-ACC-BAT-018-05
    scenarios:
      - ATS-ACC-BAT-018-05
    provenance: proposed
    source: >-
      services-accounting:modules/batches/tests/e2e/subledger-entries.e2e.spec.js#answers
      an entry of another tenant as it answers an absent one: the same status
      and error type
  - rule: BR-CAP-ACC-BAT-018-06
    scenarios:
      - ATS-ACC-BAT-018-06
    provenance: proposed
    source: >-
      services-accounting:modules/batches/tests/integration/db/subledger-entry-lines-view.integration.spec.js#answers
      the unit’s name and its base currency on every row (Reporting D6): the
      currency of debits and credits, not the document’s
  - rule: BR-CAP-ACC-BAT-018-07
    scenarios:
      - ATS-ACC-BAT-018-06
    provenance: proposed
    source: >-
      services-accounting:modules/batches/tests/integration/db/subledger-entry-lines-view.integration.spec.js#answers
      tenant B’s reader its own invoice’s lines alone
transition_coverage: []
permission_coverage:
  - key: accounting.subledger-entries.read
    surface: api
    scenarios:
      - ATS-ACC-BAT-018-01
    gap: FND-ACC-BAT-072
    provenance: unknown
    source: FND-ACC-BAT-072
    note: >-
      An aggregate persona check does not establish exhaustive allow and deny
      proof for every named surface.
  - key: accounting.subledger-entry-lines.query
    surface: service
    scenarios:
      - ATS-ACC-BAT-018-01
    gap: FND-ACC-BAT-072
    provenance: unknown
    source: FND-ACC-BAT-072
    note: >-
      An aggregate persona check does not establish exhaustive allow and deny
      proof for every named surface.
executable_coverage:
  bound_scenarios: 6
  unbound_scenarios:
    - ATS-ACC-BAT-018-07
    - ATS-ACC-BAT-018-08
    - ATS-ACC-BAT-018-09
  gap: FND-ACC-BAT-072
---

# Inspect and report on posted ledger entries: 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-018-01` | `ATS-ACC-BAT-018-01` |
| `BR-CAP-ACC-BAT-018-02` | `ATS-ACC-BAT-018-02`, `ATS-ACC-BAT-018-09` |
| `BR-CAP-ACC-BAT-018-03` | `ATS-ACC-BAT-018-03`, `ATS-ACC-BAT-018-08` |
| `BR-CAP-ACC-BAT-018-04` | `ATS-ACC-BAT-018-04`, `ATS-ACC-BAT-018-07` |
| `BR-CAP-ACC-BAT-018-05` | `ATS-ACC-BAT-018-05` |
| `BR-CAP-ACC-BAT-018-06` | `ATS-ACC-BAT-018-06` |
| `BR-CAP-ACC-BAT-018-07` | `ATS-ACC-BAT-018-06` |

## Interactions With Related Capabilities

Recovery leaves history without ordinary entries. Immutable accounting remains readable. 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.
