---
id: ATS-ACC-CLS-002
scope: CAP-ACC-CLS-002
product_area: accounting
module: close
revision: 1
status: proposed
approved_by: null
approved_at: null
source_sha:
  services-accounting: f47cb263875bbc0c5640fba7dae6785ec32695f8
  react-console: baf6dae382d6f41dce976c7f848667ccc37e076f
scenarios:
  - id: ATS-ACC-CLS-002-01
    title: Reject closing out of sequence
    level: unit
    proves:
      - BR-CAP-ACC-CLS-002-01
    preconditions: An earlier period remains open.
    steps: Validate a later close and request its authorization.
    expected: The earlier period is identified and closing is unavailable.
    negative: true
    data_needs: Open earlier periods within and across years.
    bound_to:
      - >-
        services-accounting:modules/fiscal-close/tests/unit/carried/fiscal-years/logic/validate-period-closing.spec.js#should
        throw an error if previous period in same year is open
      - >-
        services-accounting:modules/fiscal-close/tests/integration/services/authorization/period-authorization.integration.spec.js#refuses
        closing a period with an earlier one open, in 1.0’s sentence
      - TST-ACC-CLS-039
      - TST-ACC-CLS-019
    provenance: test
    source: >-
      services-accounting:modules/fiscal-close/tests/unit/carried/fiscal-years/logic/validate-period-closing.spec.js#should
      throw an error if previous period in same year is open
    category: validation
  - id: ATS-ACC-CLS-002-02
    title: Reject reopening behind protected later months
    level: unit
    proves:
      - BR-CAP-ACC-CLS-002-02
    preconditions: A later month is closed or closing.
    steps: Validate reopening an earlier month in each arrangement.
    expected: Each arrangement refuses reopening without an elapsed-time exception.
    negative: true
    data_needs: Calendars containing later closed and transitional periods.
    bound_to:
      - >-
        services-accounting:modules/fiscal-close/tests/unit/carried/fiscal-years/logic/validate-period-reopening.spec.js#should
        throw an error if subsequent period in same year is closed
      - >-
        services-accounting:modules/fiscal-close/tests/unit/carried/fiscal-years/logic/validate-period-reopening.spec.js#should
        throw an error if subsequent period in NEXT year is closed
      - >-
        services-accounting:modules/fiscal-close/tests/unit/carried/fiscal-years/logic/validate-period-reopening.spec.js#should
        throw an error if subsequent period in same year is closing, and
        modification has NOT been within five minutes
      - >-
        services-accounting:modules/fiscal-close/tests/integration/services/authorization/period-authorization.integration.spec.js#refuses
        reopening a closed period with a later one closed, in 1.0’s sentence
      - TST-ACC-CLS-040
      - TST-ACC-CLS-019
    provenance: test
    source: >-
      services-accounting:modules/fiscal-close/tests/unit/carried/fiscal-years/logic/validate-period-reopening.spec.js#should
      throw an error if subsequent period in NEXT year is closed
    category: edge
  - id: ATS-ACC-CLS-002-03
    title: Separate action authority from sequence
    level: api
    proves:
      - BR-CAP-ACC-CLS-002-04
      - BR-CAP-ACC-CLS-002-05
    preconditions: The same periods are inspected by a closer and an unprivileged caller.
    steps: Request available actions for the current and latest closed periods.
    expected: >-
      The closer receives the eligible action and the other caller receives
      permission explanations first.
    negative: false
    data_needs: Two action profiles and a mixed calendar.
    bound_to:
      - >-
        services-accounting:modules/fiscal-close/tests/integration/services/authorization/period-authorization.integration.spec.js#lets
        an authorized caller close the current period, not reopen it
      - >-
        services-accounting:modules/fiscal-close/tests/integration/services/authorization/period-authorization.integration.spec.js#lets
        an authorized caller reopen the latest closed period, not close it
      - >-
        services-accounting:modules/fiscal-close/tests/integration/services/authorization/period-authorization.integration.spec.js#refuses
        both to a caller without the keys, saying so first
      - >-
        services-accounting:modules/fiscal-close/tests/e2e/fiscal-close-readiness.e2e.spec.js#tells
        a reader they may not close
      - TST-ACC-CLS-019
      - TST-ACC-CLS-016
    provenance: test
    source: >-
      services-accounting:modules/fiscal-close/tests/integration/services/authorization/period-authorization.integration.spec.js#refuses
      both to a caller without the keys, saying so first
    category: permission
  - id: ATS-ACC-CLS-002-04
    title: Return not found for an absent year
    level: api
    proves:
      - BR-CAP-ACC-CLS-002-08
    preconditions: The requested year is unavailable in this workspace.
    steps: Request its action authorization.
    expected: The request returns not found.
    negative: true
    data_needs: An absent year reference.
    bound_to:
      - >-
        services-accounting:modules/fiscal-close/tests/integration/services/authorization/period-authorization.integration.spec.js#refuses
        a fiscal year the tenant does not have
      - TST-ACC-CLS-019
    provenance: test
    source: >-
      services-accounting:modules/fiscal-close/tests/integration/services/authorization/period-authorization.integration.spec.js#refuses
      a fiscal year the tenant does not have
    category: boundary
  - id: ATS-ACC-CLS-002-05
    title: Disable the reader’s close action
    level: browser
    proves:
      - BR-CAP-ACC-CLS-002-09
    preconditions: A read-only user views a clean month.
    steps: Open the close workspace and inspect its action controls.
    expected: Close is disabled and the reader has no reopen action.
    negative: true
    data_needs: The reader fixture from the authorization browser journey.
    bound_to:
      - >-
        react-console:acceptance/accounting/playwright/journeys/reconciliation-close/ACT-ACC-0619.spec.ts#ACT-ACC-0619
      - TST-ACC-CLS-007
    provenance: test
    source: >-
      react-console:acceptance/accounting/playwright/journeys/reconciliation-close/ACT-ACC-0619.spec.ts#ACT-ACC-0619
    category: permission
  - id: ATS-ACC-CLS-002-06
    title: Recheck action eligibility after closing and reopening
    category: interaction
    level: api
    proves:
      - BR-CAP-ACC-CLS-002-01
      - BR-CAP-ACC-CLS-002-02
      - BR-CAP-ACC-CLS-002-04
    preconditions: An authorized closer selects the current open month.
    steps: >-
      Read both available actions; close the month, read them again, reopen it
      and read them once more.
    expected: >-
      Each action result follows the changed calendar state; execution refuses a
      fresh action that no longer meets its sequence guard.
    negative: false
    data_needs: An authorized closer selects the current open month.
    bound_to: []
    provenance: proposed
    source:
      - >-
        rhythm-v2-docs:specs/accounting/close/design/workflows/WF-ACC-CLS-002-reopen-the-latest-closed-month.md#What
        It Does
      - >-
        services-accounting:modules/fiscal-close/tests/integration/services/authorization/period-authorization.integration.spec.js#refuses
        closing a period with an earlier one open, in 1.0’s sentence
      - >-
        services-accounting:modules/fiscal-close/tests/unit/carried/fiscal-years/logic/validate-period-reopening.spec.js#should
        throw an error if subsequent period in NEXT year is closed
      - >-
        services-accounting:modules/fiscal-close/tests/integration/services/authorization/period-authorization.integration.spec.js#lets
        an authorized caller close the current period, not reopen it
    exercises:
      - CAP-ACC-CLS-002
      - CAP-ACC-CLS-008
      - CAP-ACC-CLS-011
    workflows: []
evidence:
  - >-
    services-accounting examination inputs: the bound unit, integration and
    end-to-end files.
  - >-
    react-console examination inputs: the close-authorization browser journey
    and lib/accounting/close/checks.ts.
  - >-
    Testing back-fill: pinned executable files are inspected; no backend or
    browser result is claimed.
coverage:
  rule: 'gap: FND-ACC-CLS-058'
  transition: not-applicable
  validation: covered
  permission: covered
  edge: covered
  failure: 'gap: FND-ACC-CLS-058'
  boundary: covered
  concurrency: 'gap: FND-ACC-CLS-058'
  invariant: 'gap: FND-ACC-CLS-058'
  interaction: covered
coverage_notes:
  rule:
    reason: >-
      Read access to authorization, grants across multiple business units and
      neighbouring-month sequence races need explicit proof.
    provenance: unknown
    source: FND-ACC-CLS-058
  transition:
    reason: >-
      This capability evaluates or reads state; it defines no independent
      persisted lifecycle transition.
    provenance: inferred
    source:
      - CAP-ACC-CLS-002
  validation:
    scenarios:
      - ATS-ACC-CLS-002-01
    provenance: inferred
    source:
      - ATS-ACC-CLS-002-01
    note: Specified coverage does not establish that all variants execute or pass.
  permission:
    scenarios:
      - ATS-ACC-CLS-002-03
      - ATS-ACC-CLS-002-05
    provenance: inferred
    source:
      - ATS-ACC-CLS-002-03
      - ATS-ACC-CLS-002-05
    note: Specified coverage does not establish that all variants execute or pass.
  edge:
    scenarios:
      - ATS-ACC-CLS-002-02
    provenance: inferred
    source:
      - ATS-ACC-CLS-002-02
    note: Specified coverage does not establish that all variants execute or pass.
  failure:
    reason: >-
      Read access to authorization, grants across multiple business units and
      neighbouring-month sequence races need explicit proof.
    provenance: unknown
    source: FND-ACC-CLS-058
  boundary:
    scenarios:
      - ATS-ACC-CLS-002-04
    provenance: inferred
    source:
      - ATS-ACC-CLS-002-04
    note: Specified coverage does not establish that all variants execute or pass.
  concurrency:
    reason: >-
      Read access to authorization, grants across multiple business units and
      neighbouring-month sequence races need explicit proof.
    provenance: unknown
    source: FND-ACC-CLS-058
  invariant:
    reason: >-
      Read access to authorization, grants across multiple business units and
      neighbouring-month sequence races need explicit proof.
    provenance: unknown
    source: FND-ACC-CLS-058
  interaction:
    scenarios:
      - ATS-ACC-CLS-002-06
    provenance: inferred
    source:
      - ATS-ACC-CLS-002-06
    note: Specified coverage does not establish that all variants execute or pass.
design_coverage:
  objects:
    - DOM-ACC-CLS-001
  invariants:
    - id: INV-DOM-ACC-CLS-001-01
      scenarios: []
      gap: FND-ACC-CLS-058
      provenance: unknown
      source: FND-ACC-CLS-058
    - id: INV-DOM-ACC-CLS-001-02
      scenarios: []
      gap: FND-ACC-CLS-058
      provenance: unknown
      source: FND-ACC-CLS-058
    - id: INV-DOM-ACC-CLS-001-03
      scenarios: []
      gap: FND-ACC-CLS-058
      provenance: unknown
      source: FND-ACC-CLS-058
    - id: INV-DOM-ACC-CLS-001-04
      scenarios: []
      gap: FND-ACC-CLS-058
      provenance: unknown
      source: FND-ACC-CLS-058
    - id: INV-DOM-ACC-CLS-001-05
      scenarios: []
      gap: FND-ACC-CLS-058
      provenance: unknown
      source: FND-ACC-CLS-058
    - id: INV-DOM-ACC-CLS-001-06
      scenarios: []
      gap: FND-ACC-CLS-058
      provenance: unknown
      source: FND-ACC-CLS-058
    - id: INV-DOM-ACC-CLS-001-07
      scenarios: []
      gap: FND-ACC-CLS-058
      provenance: unknown
      source: FND-ACC-CLS-058
    - id: INV-DOM-ACC-CLS-001-08
      scenarios: []
      gap: FND-ACC-CLS-058
      provenance: unknown
      source: FND-ACC-CLS-058
    - id: INV-DOM-ACC-CLS-001-09
      scenarios: []
      gap: FND-ACC-CLS-058
      provenance: unknown
      source: FND-ACC-CLS-058
    - id: INV-DOM-ACC-CLS-001-10
      scenarios: []
      gap: FND-ACC-CLS-058
      provenance: unknown
      source: FND-ACC-CLS-058
  permissions:
    - key: accounting.fiscal-periods.read
      where_checked: api
      gap: FND-ACC-CLS-058
      provenance: unknown
      source: FND-ACC-CLS-058
      note: >-
        Existing permission scenarios cover the named cases; complete grant and
        surface variants need qualification.
    - key: accounting.fiscal-periods.close
      where_checked: service
      gap: FND-ACC-CLS-058
      provenance: unknown
      source: FND-ACC-CLS-058
      note: >-
        Existing permission scenarios cover the named cases; complete grant and
        surface variants need qualification.
    - key: accounting.fiscal-periods.reopen
      where_checked: service
      gap: FND-ACC-CLS-058
      provenance: unknown
      source: FND-ACC-CLS-058
      note: >-
        Existing permission scenarios cover the named cases; complete grant and
        surface variants need qualification.
  workflows: []
  state_models: []
  transitions: []
  interactions:
    - with: CAP-ACC-CLS-008
      scenario: ATS-ACC-CLS-002-06
      provenance: proposed
      source:
        - >-
          rhythm-v2-docs:specs/accounting/close/design/workflows/WF-ACC-CLS-002-reopen-the-latest-closed-month.md#What
          It Does
        - >-
          services-accounting:modules/fiscal-close/tests/integration/services/authorization/period-authorization.integration.spec.js#refuses
          closing a period with an earlier one open, in 1.0’s sentence
        - >-
          services-accounting:modules/fiscal-close/tests/unit/carried/fiscal-years/logic/validate-period-reopening.spec.js#should
          throw an error if subsequent period in NEXT year is closed
        - >-
          services-accounting:modules/fiscal-close/tests/integration/services/authorization/period-authorization.integration.spec.js#lets
          an authorized caller close the current period, not reopen it
    - with: CAP-ACC-CLS-011
      scenario: ATS-ACC-CLS-002-06
      provenance: proposed
      source:
        - >-
          rhythm-v2-docs:specs/accounting/close/design/workflows/WF-ACC-CLS-002-reopen-the-latest-closed-month.md#What
          It Does
        - >-
          services-accounting:modules/fiscal-close/tests/integration/services/authorization/period-authorization.integration.spec.js#refuses
          closing a period with an earlier one open, in 1.0’s sentence
        - >-
          services-accounting:modules/fiscal-close/tests/unit/carried/fiscal-years/logic/validate-period-reopening.spec.js#should
          throw an error if subsequent period in NEXT year is closed
        - >-
          services-accounting:modules/fiscal-close/tests/integration/services/authorization/period-authorization.integration.spec.js#lets
          an authorized caller close the current period, not reopen it
---
# Check whether a close or reopen is available: Capability Test Specification

## Coverage

The table maps each required rule to its specified cases or an explicit finding. Category coverage describes the specification; executable bindings and recorded run results establish different kinds of evidence. Proposed cases remain unqualified.

| Rule | Scenarios or Finding |
|---|---|
| `BR-CAP-ACC-CLS-002-01` | `ATS-ACC-CLS-002-01`, `ATS-ACC-CLS-002-06` |
| `BR-CAP-ACC-CLS-002-02` | `ATS-ACC-CLS-002-02`, `ATS-ACC-CLS-002-06` |
| `BR-CAP-ACC-CLS-002-04` | `ATS-ACC-CLS-002-03`, `ATS-ACC-CLS-002-06` |
| `BR-CAP-ACC-CLS-002-05` | `ATS-ACC-CLS-002-03` |
| `BR-CAP-ACC-CLS-002-08` | `ATS-ACC-CLS-002-04` |
| `BR-CAP-ACC-CLS-002-09` | `ATS-ACC-CLS-002-05` |

## Interactions With Related Capabilities

Action eligibility needs another evaluation after close or reopen changes the calendar. The interaction case checks that callers receive choices consistent with the new period state; isolated sequence and permission cases cover different parts of that contract.
