Skip to content

CAP-ACC-CLS-002Check whether a close or reopen is available

Markdown

CAP-ACC-CLS-002

Check whether a close or reopen is available

Markdown
  • DocumentDraft
  • Product intentProposed
  • ImplementationObserved

KindCapabilityProduct areaAccountingModuleMonth-End ClosingRevision1

Read atservices-accounting f47cb263react-console baf6dae3

The Formal Contract

The narrative above explains; the sections below are authoritative — the rules, scenarios and tests this document binds.

Outcomes
Finance staff follow the permitted sequence of months.Unavailable actions give a reason the person can understand.
Surfaces
consoleapi
Intent sources
services-accounting:docs/milestones/plans/ACCT-M4-plan.md#4a row 75 (class A: reopen needs accounting.fiscal-periods.reopen)

Controls

23 controls apply, from the corpus control catalogue.

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

Permissions

KeyChecked atScope
accounting.fiscal-periods.readapitenant
accounting.fiscal-periods.closeservicetenant
accounting.fiscal-periods.reopenservicetenant

Business Rules

9 rules, 6 to be proved before approval. A rule's product intent is derived from its origin: 0 confirmed by a product decision, the rest inheriting this capability's proposed.

IdRuleKindEnforced atProvenance
01must prove
Proposed
Closing requires an open month with all earlier months of the business unit closed; a sequence refusal identifies the earliest earlier month still outstanding.
✓ A September close is eligible after every preceding month completes.✗ An unfinished July is identified when September’s close is refused.
origin: fiscal-close design L2 (Rhythm 1.0 CLOSE-2 kept)
validationservicetest
02must prove
Proposed
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.
✓ September can reopen when it is the most recent eligible close.✗ A closed September prevents reopening August first.
origin: fiscal-close design L10 (Rhythm 1.0 REOPEN-1 and REOPEN-2 kept; the five-minute self-heal removed)
validationservicetest
03
Proposed
Period start dates determine sequence across years.
calculationservicetest
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
04must prove
Proposed
Close authorization combines the close permission with closing sequence, and reopen authorization combines the reopen permission with reopening sequence, independently of readiness.
origin: services-accounting:docs/milestones/plans/ACCT-M4-plan.md#4a row 75 (class A; plan approved 2026-10-21)
permissionservicetest
05must prove
Proposed
For each unavailable action, missing permission takes precedence over a sequence explanation.
policyservicetest
06
Proposed
Close and reopen grants apply across the workspace’s business units rather than to an individual unit.
origin: reconciliation decision D5 (business-unit-scoped grants not available in Platform), followed here
permissionapiobserved
07
Proposed
The authorization response returns an empty list of authorized closers.
policyserviceobserved
08must prove
Proposed
Authorization for a year or period absent from the workspace returns not found.
validationservicetest
09must prove
Proposed
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.
policyconsoleobserved

Scenarios

IdGivenWhenThenProvenance
01The current September is open and the controller has both action grants.The controller checks available actions.Closing is available; reopening is unavailable for the open month.test
02A reader has no close grant.The reader checks the September action.The response explains the missing close authority.test

The Markdown files under specs/ in rhythmsoftware/rhythm-v2-docs are the canonical source of truth. This reader is a generated, read-only projection of them.