🚧 The posting boundary
Updated
It locks the past: a document dated on or before the chosen day can neither be posted nor unposted. Two dates for the whole stand — Closed through (for everyone) and Auditors through (for holders of the "post in audit" right). This is neither a calendar of months nor an Accounting dictionary.
An example: 2025-12-31 — 2025 and earlier are frozen, 2026 is open. Clear the
date, save, and the past is open again.
Administrator → Posting boundary (/accountingperiods). The API:
GET/PUT /api/security/accounting-periods.
What it is not#
The Accounting model has a FiscalPeriod dictionary ("Fiscal periods"):
January, February, From/To, an Open/Closed status. The general ledger picks the
period by the document's date. A closed month in the dictionary does not
move the kernel's boundary, and the reverse: one date cannot say
"February is closed, January is open".
| The posting boundary (kernel) | FiscalPeriod (Accounting) | |
|---|---|---|
| Where | Core, the Administrator ribbon | the business layer, the Accounting menu |
| What | two dates per tenant | rows of months / quarters |
| What it acts on | any posting / register movements | any posting: IFiscalCalendar in DocumentPostingService, plus a silent skip in IGeneralLedgerService.EntryAsync |
| Who sets it | the AccountingPeriods.SetClosed / SetAudit right |
whoever may edit the dictionary |
How it works#
- Closed through — hard. A movement dated no later than this is posted and
unposted by nobody (
ClosedPeriodViolation). - Auditors through — soft. The same, until the
AccountingPeriods.PostInAuditright is held. - The guard sits in
DocumentPostingService(and inIInformationRegisterServicefor the information register): it looks at the document's date and at the dates of the movements already written there. - Every change of the boundaries is written to the audit log
(
AccountingPeriod.Set).
The implementation is IAccountingPeriodService / MetaAccountingPeriods.
Code still uses those type names; the UI and the wiki say "the posting
boundary". There is no PostingBoundary type.
Tests#
- The platform:
src/ZuloOne.Tests/PostingBoundaryTests.cs— the API contract (reading, an empty PUT, the rights catalogue). The global date is not left configured by that test: it is shared across the stand. - The behaviour on posting: the TestBench case
Итоги учётные периоды блокируют проведение— a closed date blocks posting and unposting, an audit date without the right does too, and clearing the boundaries restores both. - The ledger:
Accounting/Tests/LedgerGuardsTest— overlaps and the closing order of FiscalPeriod, not the kernel boundary.