Skip to content

feat(close): year-end readiness checklist and depreciation entry - #6

Merged
borgoat merged 1 commit into
mainfrom
feat/close-year-end
Sep 23, 2026
Merged

borgoat merged 1 commit into
mainfrom
feat/close-year-end

Conversation

@borgoat

@borgoat borgoat commented Sep 22, 2026

Copy link
Copy Markdown
Member

What. A quints close command group in the "Reports & year-end" panel:

  • quints close check --year 2026 — eleven pass/warn/fail items answering "can this year be closed?", each with counts, account names and dates attached, and the command that fixes it. Reports and exits 0; --strict exits 1 while anything fails.
  • quints close depreciation --year 2026 — prints the year's depreciation entry (Art. 960a OR) plus balance assertions to review and paste, like fx revalue. Never writes the ledger; re-running after booking prints a zero delta.

Why. The first real fiscal-year close on this tool is due after 2026-12-31, and today the year-end procedure is prices sync, fx revalue, report statements, with depreciation done by hand and nothing checking that the year is actually ready. The checklist is also the surface an agent can loop on: --json with stable keys, --strict to gate.

Depreciation reads metadata on the fixed-asset open directives (depreciation:, depreciation_rate:/useful_life_years:, residual:, depreciation_category:, depreciation_contra:), supports direct and indirect (Wertberichtigung) booking, and warns when a rate exceeds the ESTV Merkblatt A/1995 Normalsatz for its category, shipped as reference data and verified against the ESTV PDF, along with the veb.ch KMU codes for the 15xx contra accounts (added to KMU_NAMES).

How to try it:

cd packages/quints/examples
uv run --project ../.. quints close check --year 2026
uv run --project ../.. quints close check --year 2026 --json
uv run --project ../.. quints close depreciation --year 2026

The example's 2026 is deliberately not closed (VAT unsettled, no year-end assertions), which is what the checklist is for. docs/guides/year-end.md walks the whole sequence; every fenced command in it runs in CI.

Verified. make check green: ruff, basedpyright 0 errors, import-linter 3 contracts kept, deptry, vulture, pytest 302 passed / 2 skipped in 2.4s.

Known follow-ups. docs/assets/quickstart.gif now shows a stale directive count (32, was 30); VAT periods are assumed quarterly in the vat item; the receivables item will gain payables once that PR lands.

🤖 Generated with Claude Code

https://claude.ai/code/session_01P5eEm1HRvxBc3KNz8vdR1R

A `quints close` group: `close check --year` runs eleven items over one
ledger load — VAT periods settled and paid, no `!` drafts, staging and
inbox clear, documents linked, a bank balance assertion dated 1 January
(where beancount actually evaluates it), FX revaluation and depreciation
booked, year-end rates present, receivables aged — each pass/warn/fail
with machine-readable specifics; it reports and exits 0, `--strict` gates
on failures. `close depreciation --year` prints the write-down to paste
from `depreciation*:` metadata on the fixed-asset open directives, direct
or against a Wertberichtigung account, idempotent through a
`depreciation_year:` marker, with the ESTV Merkblatt A/1995 Normalsätze
shipped as the maximum-rate check. The scaffold opens a fixed-asset and a
depreciation account carrying the vocabulary, and a "Close the year" guide
documents the sequence.

Claude-Session: https://claude.ai/code/session_01P5eEm1HRvxBc3KNz8vdR1R
@borgoat
borgoat force-pushed the feat/close-year-end branch from 6597eea to ae62c0e Compare September 23, 2026 11:56
@borgoat
borgoat merged commit bf32ef1 into main Sep 23, 2026
8 checks passed
@borgoat
borgoat deleted the feat/close-year-end branch October 8, 2026 16:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant