From 6de6ffa3e52a2bec519c2a052d0f26d01e38f167 Mon Sep 17 00:00:00 2001 From: Anders Betts Date: Fri, 18 Sep 2026 09:50:29 +0200 Subject: bokftui: IB view shows effective opening balances, edits post deltas to them Was listing the IB voucher's rows (the reconciliation deltas) and computing edits against those, which mismatched reports on years with carry-forward and could not set a target balance. Also guard the editor against more than 63 rows. --- docs/PROTOCOL.md | 7 ++++--- docs/STATE.md | 6 ++++-- 2 files changed, 8 insertions(+), 5 deletions(-) (limited to 'docs') diff --git a/docs/PROTOCOL.md b/docs/PROTOCOL.md index 009b14e..f282691 100644 --- a/docs/PROTOCOL.md +++ b/docs/PROTOCOL.md @@ -404,9 +404,10 @@ commands. Implemented screens (0.1.0-dev): - **Nytt verifikat** — row editor with live balance display, F5 dry-run validation and F9 posting; one `client_ref` per form makes retries safe. F4 applies a konteringsmall (prompts for template and `x`). -- **Ingående balans** — the series `IB` voucher for the selected fiscal year; - enter accounts with signed amounts (positive debit, negative credit), the - editor posts deltas so existing entries are never edited. +- **Ingående balans** — the effective opening balances of the selected + fiscal year (carry-forward plus any `IB` vouchers, as the reports compute + them); enter accounts with signed amounts (positive debit, negative + credit); the editor posts `IB` deltas so nothing is ever edited. - **Välj organisation att representera** — login step two: pick which org the session works in. `--org ID` skips the picker for scripts. - **Byt räkenskapsår** (dashboard) — pick from the org's fiscal years; shown diff --git a/docs/STATE.md b/docs/STATE.md index f130f14..3cbe448 100644 --- a/docs/STATE.md +++ b/docs/STATE.md @@ -41,8 +41,10 @@ server/protocol/ledger only. instead of delete. 9. **Ingående balans**: one series `IB` voucher per fiscal year (dated at year start). Reports treat series IB as IB, not period movement; SIE - export/import round-trips without double counting; TUI editor posts only - deltas so nothing is ever edited. + export/import round-trips without double counting; TUI editor shows the + year's *effective* opening balances (carry-forward plus IB vouchers) and + posts deltas, so nothing is ever edited and a target balance can be + entered directly. 10. **Attachments**: content stored in the DB (BLOB), immutable, linked via append-only `voucher_attachments`. Default limit 10 MiB (`max_attachment_bytes`); the socket line limit is derived from it -- cgit v1.3