---
id: ATS-ACC-BAT-012
scope: CAP-ACC-BAT-012
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-012-01
    title: Preview validates permission and selection size
    level: api
    proves:
      - BR-CAP-ACC-BAT-012-01
      - BR-CAP-ACC-BAT-012-02
    preconditions: One caller lacks preview access and another has it.
    steps: 'Preview as both, then submit empty and oversized selections.'
    expected: >-
      The unauthorized call returns 403; zero and more than one hundred
      references return 400.
    negative: true
    data_needs: Provide security fixtures.
    bound_to:
      - TST-ACC-BAT-057
      - TST-ACC-BAT-124
    provenance: test
    source: >-
      services-accounting:modules/batches/tests/e2e/batch-postings.e2e.spec.js#refuses
      a preview without the preview permission, 403
    category: permission
    test_evidence:
      - >-
        services-accounting:modules/batches/tests/e2e/batch-postings.e2e.spec.js#refuses
        a preview without the preview permission, 403
      - >-
        services-accounting:modules/batches/tests/e2e/batch-postings.e2e.spec.js#refuses
        a preview that names no batch, 400
      - >-
        services-accounting:modules/batches/tests/unit/jobs/submission-execution-split.spec.js#refuses
        a preview naming no batch, more than 100, or no tenant
  - id: ATS-ACC-BAT-012-02
    title: Preview reports generation problems
    level: api
    proves:
      - BR-CAP-ACC-BAT-012-03
      - BR-CAP-ACC-BAT-012-04
    preconditions: >-
      The selection includes an unknown batch, a posted batch, a closed period,
      missing account configuration, missing exchange rate and a valid batch.
    steps: Preview the whole selection.
    expected: >-
      Generation problems carry their reasons and the valid batch can proceed;
      preview does not independently enforce all status and lock guards.
    negative: true
    data_needs: Provide seeded documents and configuration.
    bound_to: []
    provenance: proposed
    source: >-
      services-accounting:modules/batches/services/engine/preview-batches.ts:previewBatchPostings
    category: rule
    test_evidence: []
    note: >-
      The available assertions do not execute this complete scenario; executable
      coverage remains a gap.
  - id: ATS-ACC-BAT-012-03
    title: Preview leaves no lasting posting changes
    level: api
    proves:
      - BR-CAP-ACC-BAT-012-06
    preconditions: An Open batch contains documents.
    steps: >-
      Preview it and inspect batch state, posting history, ledger and remaining
      locks.
    expected: >-
      The batch stays Open without a posting or entry, and transaction locks
      have been released.
    negative: false
    data_needs: Provide no fixtures beyond the stated setup.
    bound_to: []
    provenance: proposed
    source: 'services-accounting:modules/batches/services/engine/preview-batches.ts'
    category: invariant
    test_evidence: []
  - id: ATS-ACC-BAT-012-04
    title: Readiness does not reserve eligibility
    category: interaction
    level: api
    proves:
      - BR-CAP-ACC-BAT-012-06
      - BR-CAP-ACC-BAT-013-06
    exercises:
      - CAP-ACC-BAT-012
      - CAP-ACC-BAT-013
    workflows: []
    preconditions: Morning has a valid invoice in an Open period.
    steps: >-
      Preview Morning, close its fiscal period using a controlled fixture and
      request posting.
    expected: >-
      The earlier preview is eligible; the later action refuses the changed
      fiscal state without creating a job.
    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/services/engine/preview-batches.ts:periodProblemOf;
      services-accounting:modules/batches/services/persistence/posting-periods.ts:lockPostingPeriodForDate;
      services-accounting:modules/batches/services/actions/batch-actions.ts:postBatch;
      services-accounting:modules/batches/services/engine/engine-scope.ts:lockBatchesForPosting
  - id: ATS-ACC-BAT-012-05
    title: Account correction changes readiness
    category: interaction
    level: api
    proves:
      - BR-CAP-ACC-BAT-012-03
      - BR-CAP-ACC-BAT-014-03
    exercises:
      - CAP-ACC-BAT-012
      - CAP-ACC-BAT-014
    workflows: []
    preconditions: Morning’s invoice product has no resolvable revenue account.
    steps: 'Preview, configure the missing account and preview again.'
    expected: >-
      The first result names the missing account and the second includes Morning
      as a candidate.
    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/services/engine/preview-batches.ts:previewBatchPostings;
      services-accounting:modules/batches/tests/integration/services/posting/gl-resolution-at-posting.integration.spec.js#fails
      the batch’s validation with an error naming the invoice, the missing
      accounts receivable account, the product’s setup and the unit’s default
  - id: ATS-ACC-BAT-012-06
    title: Preview accepts both selection endpoints
    category: boundary
    level: api
    proves:
      - BR-CAP-ACC-BAT-012-02
    preconditions: One hundred existing batch references belong to one isolated workspace.
    steps: >-
      Preview selections of one and one hundred, then submit zero and one
      hundred one references.
    expected: Both supported requests reach preview; both unsupported sizes return 400.
    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/batch-postings.e2e.spec.js#refuses
      a preview that names no batch, 400
evidence:
  - services-accounting at f47cb263: 'Inspected references: scenario-bound tests in modules/batches/tests.'
  - >-
    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-066'
  permission: 'gap: FND-ACC-BAT-066'
  edge: 'gap: FND-ACC-BAT-066'
  failure: 'gap: FND-ACC-BAT-066'
  boundary: covered
  concurrency: 'gap: FND-ACC-BAT-066'
  invariant: covered
  interaction: covered
coverage_notes:
  rule: >-
    Exact selection boundaries, exception handling, candidate precedence, Error
    candidates and changes after preview need focused proof; preview cannot
    reserve later admission.
  transition: >-
    Preview is a read-only operation and defines no persistent lifecycle
    transition.
  validation: >-
    Exact selection boundaries, exception handling, candidate precedence, Error
    candidates and changes after preview need focused proof; preview cannot
    reserve later admission.
  edge: >-
    Exact selection boundaries, exception handling, candidate precedence, Error
    candidates and changes after preview need focused proof; preview cannot
    reserve later admission.
  boundary: >-
    Exact selection boundaries, exception handling, candidate precedence, Error
    candidates and changes after preview need focused proof; preview cannot
    reserve later admission.
  concurrency: >-
    Exact selection boundaries, exception handling, candidate precedence, Error
    candidates and changes after preview need focused proof; preview cannot
    reserve later admission.
rule_coverage:
  - rule: BR-CAP-ACC-BAT-012-01
    scenarios:
      - ATS-ACC-BAT-012-01
    provenance: proposed
    source: >-
      services-accounting:modules/batches/tests/e2e/batch-postings.e2e.spec.js#refuses
      a preview without the preview permission, 403
  - rule: BR-CAP-ACC-BAT-012-02
    scenarios:
      - ATS-ACC-BAT-012-01
      - ATS-ACC-BAT-012-06
    provenance: proposed
    source: >-
      services-accounting:modules/batches/tests/e2e/batch-postings.e2e.spec.js#refuses
      a preview that names no batch, 400
  - rule: BR-CAP-ACC-BAT-012-03
    scenarios:
      - ATS-ACC-BAT-012-02
      - ATS-ACC-BAT-012-05
    provenance: proposed
    source: >-
      services-accounting:modules/batches/services/engine/preview-batches.ts:previewBatchPostings
  - rule: BR-CAP-ACC-BAT-012-04
    scenarios:
      - ATS-ACC-BAT-012-02
    provenance: proposed
    source: >-
      services-accounting:modules/batches/tests/unit/rules/batch-posting-preview-rules.spec.js#says
      already posted, whatever other reason it has, for a posted batch
  - rule: BR-CAP-ACC-BAT-012-06
    scenarios:
      - ATS-ACC-BAT-012-03
      - ATS-ACC-BAT-012-04
    provenance: proposed
    source: >-
      services-accounting:modules/batches/services/engine/preview-batches.ts:periodProblemOf;
      services-accounting:modules/batches/services/persistence/posting-periods.ts:lockPostingPeriodForDate
transition_coverage: []
permission_coverage:
  - key: accounting.batch-postings.preview
    surface: api
    scenarios:
      - ATS-ACC-BAT-012-01
    gap: FND-ACC-BAT-066
    provenance: unknown
    source: FND-ACC-BAT-066
    note: >-
      An aggregate persona check does not establish exhaustive allow and deny
      proof for every named surface.
executable_coverage:
  bound_scenarios: 1
  unbound_scenarios:
    - ATS-ACC-BAT-012-02
    - ATS-ACC-BAT-012-03
    - ATS-ACC-BAT-012-04
    - ATS-ACC-BAT-012-05
    - ATS-ACC-BAT-012-06
  gap: FND-ACC-BAT-066
---

# Inspect posting readiness before submission: 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-012-01` | `ATS-ACC-BAT-012-01` |
| `BR-CAP-ACC-BAT-012-02` | `ATS-ACC-BAT-012-01`, `ATS-ACC-BAT-012-06` |
| `BR-CAP-ACC-BAT-012-03` | `ATS-ACC-BAT-012-02`, `ATS-ACC-BAT-012-05` |
| `BR-CAP-ACC-BAT-012-04` | `ATS-ACC-BAT-012-02` |
| `BR-CAP-ACC-BAT-012-06` | `ATS-ACC-BAT-012-03`, `ATS-ACC-BAT-012-04` |

## Interactions With Related Capabilities

Readiness does not reserve eligibility. Account correction changes readiness. 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.
