---
id: CAP-ACC-CLS-002
title: Check whether a close or reopen is available
feature: FEAT-ACC-CLS-01
product_area: accounting
module: close
revision: 1
status: draft
product_intent: proposed
implementation_evidence: observed
supersedes:
  - >-
    CAP-ACC-REC-015 (react-console acceptance inventory, the period
    authorization half)
  - RUL-ACC-REC-063
  - RUL-ACC-REC-064
  - RUL-ACC-REC-095
source_sha:
  services-accounting: f47cb263875bbc0c5640fba7dae6785ec32695f8
  react-console: baf6dae382d6f41dce976c7f848667ccc37e076f
intent_sources:
  - >-
    services-accounting:docs/milestones/plans/ACCT-M4-plan.md#4a row 75 (class
    A: reopen needs accounting.fiscal-periods.reopen)
purpose: Staff learn which closing action they can take before they attempt it.
outcomes:
  - Finance staff follow the permitted sequence of months.
  - Unavailable actions give a reason the person can understand.
concepts:
  - CON-ACC-CLS-001
actors:
  - ACT-ACC-015
  - ACT-ACC-007
surfaces:
  - console
  - api
preconditions: []
postconditions: []
permissions:
  - key: accounting.fiscal-periods.read
    where_checked: api
    scope: tenant
  - key: accounting.fiscal-periods.close
    where_checked: service
    scope: tenant
  - key: accounting.fiscal-periods.reopen
    where_checked: service
    scope: tenant
rules:
  - id: BR-CAP-ACC-CLS-002-01
    proved_by: [ATS-ACC-CLS-002-01, ATS-ACC-CLS-002-06, TST-ACC-CLS-019, TST-ACC-CLS-039]
    statement: >-
      Closing requires an open month with all earlier months of the business
      unit closed; a sequence refusal identifies the earliest earlier month
      still outstanding.
    kind: validation
    enforced_at:
      - service
    must_prove: true
    provenance: test
    source: >-
      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
    origin: fiscal-close design L2 (Rhythm 1.0 CLOSE-2 kept)
    examples:
      positive: A September close is eligible after every preceding month completes.
      negative: An unfinished July is identified when September’s close is refused.
  - id: BR-CAP-ACC-CLS-002-02
    proved_by: [ATS-ACC-CLS-002-02, ATS-ACC-CLS-002-06, TST-ACC-CLS-019, TST-ACC-CLS-040]
    statement: >-
      Reopening requires a closed month with every later month of the business
      unit open, including periods in later years; closing or reopening a later
      month prevents the action.
    kind: validation
    enforced_at:
      - service
    must_prove: true
    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
    origin: >-
      fiscal-close design L10 (Rhythm 1.0 REOPEN-1 and REOPEN-2 kept; the
      five-minute self-heal removed)
    examples:
      positive: September can reopen when it is the most recent eligible close.
      negative: A closed September prevents reopening August first.
  - id: BR-CAP-ACC-CLS-002-03
    proved_by: []
    statement: Period start dates determine sequence across years.
    kind: calculation
    enforced_at:
      - service
    must_prove: false
    provenance: test
    source: >-
      services-accounting:modules/fiscal-close/tests/unit/readiness/period-rules.spec.js#is
      blocked by a period of an earlier year, and counts every one oldest first
    origin: none
  - id: BR-CAP-ACC-CLS-002-04
    proved_by: [ATS-ACC-CLS-002-03, ATS-ACC-CLS-002-06, TST-ACC-CLS-016, TST-ACC-CLS-019]
    statement: >-
      Close authorization combines the close permission with closing sequence,
      and reopen authorization combines the reopen permission with reopening
      sequence, independently of readiness.
    kind: permission
    enforced_at:
      - service
    must_prove: true
    provenance: test
    source: >-
      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
    origin: >-
      services-accounting:docs/milestones/plans/ACCT-M4-plan.md#4a row 75 (class
      A; plan approved 2026-10-21)
  - id: BR-CAP-ACC-CLS-002-05
    proved_by: [ATS-ACC-CLS-002-03, TST-ACC-CLS-016, TST-ACC-CLS-019]
    statement: >-
      For each unavailable action, missing permission takes precedence over a
      sequence explanation.
    kind: policy
    enforced_at:
      - service
    must_prove: true
    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
    origin: none
  - id: BR-CAP-ACC-CLS-002-06
    proved_by: []
    statement: >-
      Close and reopen grants apply across the workspace’s business units rather
      than to an individual unit.
    kind: permission
    enforced_at:
      - api
    must_prove: false
    provenance: observed
    source: 'services-accounting:aws/accounting.service.ts:FiscalPeriodActions'
    origin: >-
      reconciliation decision D5 (business-unit-scoped grants not available in
      Platform), followed here
  - id: BR-CAP-ACC-CLS-002-07
    proved_by: []
    statement: The authorization response returns an empty list of authorized closers.
    kind: policy
    enforced_at:
      - service
    must_prove: false
    provenance: observed
    source: >-
      services-accounting:modules/fiscal-close/services/authorization/period-authorization.ts:authorizePeriodClose
    origin: none
  - id: BR-CAP-ACC-CLS-002-08
    proved_by: [ATS-ACC-CLS-002-04, TST-ACC-CLS-019]
    statement: >-
      Authorization for a year or period absent from the workspace returns not
      found.
    kind: validation
    enforced_at:
      - service
    must_prove: true
    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
    origin: none
  - id: BR-CAP-ACC-CLS-002-09
    proved_by: [ATS-ACC-CLS-002-05, TST-ACC-CLS-007]
    statement: >-
      The console enables Close only for a current open month with authorization
      and usable readiness, and offers Reopen only for the authorized latest
      closed month.
    kind: policy
    enforced_at:
      - console
    must_prove: true
    provenance: observed
    source: 'react-console:lib/accounting/close/checks.ts:closeUnavailableReason'
    origin: 'services-accounting:docs/milestones/ACCT-M1-books-and-invoices.md#D10.3'
scenarios:
  - id: SC-CAP-ACC-CLS-002-01
    given: The current September is open and the controller has both action grants.
    when: The controller checks available actions.
    then: Closing is available; reopening is unavailable for the open month.
    provenance: test
    source: >-
      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
  - id: SC-CAP-ACC-CLS-002-02
    given: A reader has no close grant.
    when: The reader checks the September action.
    then: The response explains the missing close authority.
    provenance: test
    source: >-
      services-accounting:modules/fiscal-close/tests/e2e/fiscal-close-readiness.e2e.spec.js#tells
      a reader they may not close
edge_cases: []
constraints: []
depends_on:
  - CAP-ACC-CLS-001
related:
  - CAP-ACC-CLS-008
  - CAP-ACC-CLS-011
journeys:
  - JNY-ACC-CLS-003
open_questions: []
evidence:
  - >-
    services-accounting examination inputs:
    modules/fiscal-close/aws/api/fiscal-close.routes.ts
    (getFiscalCloseAuthorization),
    services/authorization/period-authorization.ts,
    services/rules/period-sequence.ts, aws/accounting.service.ts
    (FiscalPeriodActions); tests
    integration/services/authorization/period-authorization.integration.spec.js,
    unit/carried/fiscal-years/logic/validate-period-closing.spec.js,
    validate-period-reopening.spec.js, e2e/fiscal-close-readiness.e2e.spec.js
    (the authorization).
  - >-
    react-console examination inputs: lib/accounting/close/checks.ts
    (closeUnavailableReason, latestClosedPeriod),
    components/accounting/close/readiness-summary.tsx, close-workspace.tsx,
    close-history.tsx.
controls: [TC-IAM-001, TC-IAM-002, TC-IAM-004, TC-IAM-005, TC-AZ-001, TC-AZ-002, TC-AZ-003, TC-AZ-004, TC-AZ-005, TC-AZ-006, TC-TEN-001, TC-TEN-002, TC-TEN-003, TC-TEN-004, TC-DAT-001, TC-LOG-001, TC-LOG-002, TC-LOG-003, TC-LOG-004, TC-LOG-005, TC-PI-001, TC-PI-003, TC-PI-005]
exercised_by: [FAS-ACC-CLS-01-01, FAS-ACC-CLS-01-03, FAS-ACC-CLS-01-04, FAS-ACC-CLS-01-05]
suites: [TST-ACC-CLS-007, TST-ACC-CLS-016, TST-ACC-CLS-019, TST-ACC-CLS-039, TST-ACC-CLS-040]
---

# Check whether a close or reopen is available

## Purpose

Staff learn which closing action they can take before they attempt it.

## How It Works

The controller requests the available actions for a selected month. The service considers permission first and then the order of periods. It returns an answer for closing and a separate answer for reopening. A missing permission is explained before a sequencing problem. Readiness is assessed separately, so authorization alone does not establish that the books are complete. The console uses these answers together with the month’s current state. A disabled Close control explains what prevents the action. Reopen is limited to the latest closed month. These grants currently cover the whole workspace. The product should identify other authorized closers when a supported security lookup becomes available.

## Relationships

- The calendar supplies the periods and their order.
- Close and reopen execution enforce sequence again when acting.
