Financial Periods
Financial periods define the date ranges for accounting activity. Every journal entry must fall within an open period.
Rules
start_datemust be beforeend_date- Periods must not overlap
- Periods can be any duration (day, month, quarter, year)
- Gaps between periods are allowed
- Multiple periods can be open simultaneously
Open vs Closed
- Open: Accepts new journal entries within its date range.
- Closed: Permanently sealed. No new entries, no reopening.
Entry Date Validation
When posting a journal entry, ClawCounting:
- Looks up which period contains the
entry_date - If no period covers that date – error (
NO_OPEN_PERIOD) - If the matching period is closed – error (
PERIOD_CLOSED) - The entry is linked to that period via
period_id
Period Close
Closing a period is a permanent operation that:
- Debits each revenue account to zero its balance for the period
- Credits each expense account to zero its balance for the period
- Posts the net income (or net loss) to the retained earnings account
- Creates an automatic closing journal entry linked to the period
- Marks the period as closed with a timestamp
Prerequisites
retained_earnings_account_idmust be set in settings- The retained earnings account must be an equity-type account
- The period must be open
Workflow
Always preview first:
# Preview -- shows the closing entry without committing
clawcounting periods close <period-id> --preview --api-key $API_KEY --json
# Close -- permanent
clawcounting periods close <period-id> --api-key $API_KEY --json
After Closing
- No new entries can be posted to the closed period
- The period cannot be reopened
- Errors in closed periods are corrected via adjusting entries in an open period
- Asset, liability, and equity balances carry forward naturally (they are permanent accounts)
Examples
Annual periods
clawcounting periods create --name "FY2026" --start 2026-01-01 --end 2026-12-31 --json
Quarterly periods
clawcounting periods create --name "Q1 2026" --start 2026-01-01 --end 2026-03-31 --json
clawcounting periods create --name "Q2 2026" --start 2026-04-01 --end 2026-06-30 --json
clawcounting periods create --name "Q3 2026" --start 2026-07-01 --end 2026-09-30 --json
clawcounting periods create --name "Q4 2026" --start 2026-10-01 --end 2026-12-31 --json