From 2a98cce8434f7ea27f777d9e6422a1eb92ba8be7 Mon Sep 17 00:00:00 2001 From: Anders Betts Date: Thu, 17 Sep 2026 23:02:41 +0200 Subject: sie: import CRLF, #RAR 0, zero rows; skip #IB with prior history - tokenizer treats CR as whitespace; closing brace matches with CRLF - only #RAR with year indicator 0 selects the fiscal year - zero-amount #TRANS rows are dropped instead of violating the schema - #IB becomes an IB voucher only when the year has no earlier history --- docs/PROTOCOL.md | 2 +- docs/STATE.md | 7 ++++++- 2 files changed, 7 insertions(+), 2 deletions(-) (limited to 'docs') diff --git a/docs/PROTOCOL.md b/docs/PROTOCOL.md index 25c9250..f3d7cac 100644 --- a/docs/PROTOCOL.md +++ b/docs/PROTOCOL.md @@ -374,7 +374,7 @@ All reports are pure reads, respect locks, and return JSON rows. Amounts are | Command | Args | Result | |---|---|---| | `sie.export` | `fiscal_year`, `inline?` | by default writes `/_.se` and returns `path`, `sha256`, `size`; `inline:true` also returns `content_base64` | -| `sie.import` | `content_base64` or `path`, `dry_run?` | creates missing accounts and posts #VER as `source:"sie_import"`; only into an empty org fiscal year | +| `sie.import` | `content_base64` or `path`, `dry_run?` | one file per call; creates missing accounts and posts #VER as `source:"sie_import"`; only into an empty org fiscal year; `#IB` becomes an `IB` voucher when the year has no earlier history, otherwise the earlier vouchers carry the balances | SIE 4 files are written in CP437 with PC8 format, `#SIETYP 4`, `#FNR`, `#ORGNR`, `#KONTO`, `#IB`, `#UB`, `#RES`, `#VER`, `#TRANS`. Import is the migration path diff --git a/docs/STATE.md b/docs/STATE.md index f4a563a..f130f14 100644 --- a/docs/STATE.md +++ b/docs/STATE.md @@ -95,7 +95,12 @@ server/protocol/ledger only. 9. Password change, user disable, TOTP. 10. Bank import/reconciliation (CSV first, then PSD2), invoicing/reskontra, AGI/payroll if employees. -11. SIE import only into an empty fiscal year; consider broader import. +11. ~~SIE import only into an empty fiscal year; consider broader import.~~ + Chronological multi-year import works (CRLF, `#RAR 0`, zero rows, `#IB` + rule handled); each year must still target an empty fiscal year. Note: + years whose source system kept corrected `#IB`/`#UB` that the vouchers + do not reproduce (like the Kapitas 2022-2026 books) diverge from the + source when imported as history; the latest year imports exactly. 12. TUI polish: horizontal scrolling in long text fields, bracketed paste. ## Environment / how to run -- cgit v1.3