diff options
Diffstat (limited to 'docs')
| -rw-r--r-- | docs/PROTOCOL.md | 9 | ||||
| -rw-r--r-- | docs/STATE.md | 10 |
2 files changed, 17 insertions, 2 deletions
diff --git a/docs/PROTOCOL.md b/docs/PROTOCOL.md index 081eb6a..d50f5ee 100644 --- a/docs/PROTOCOL.md +++ b/docs/PROTOCOL.md @@ -451,7 +451,11 @@ linked to that voucher and each item carries that `voucher_id`. | `sru.export` | `fiscal_year`, `adjustments?`, `submitter?`, `assisted?`, `audited?`, `ignore_unmapped?` | `INFO.SRU` + `BLANKETTER.SRU` (ISO-8859-1, base64) | All reports are pure reads, respect locks, and return JSON rows. Amounts are -öre. `report.general_ledger` (huvudbok) returns account blocks: +öre. IB (ingående balans) for a balance account (asset, liability, equity) is +all earlier history, including earlier years' `IB` vouchers, plus this +year's `IB` vouchers; a P&L account (revenue, expense) restarts at zero at +every fiscal-year start, so its IB is only this year's `IB` vouchers and, +with a narrowed `from`, the year's movements before it. `report.general_ledger` (huvudbok) returns account blocks: `{"fiscal_year","from","to","last_voucher":{...},"accounts":[{"account", "name","ib_ore","debit_ore","credit_ore","ub_ore","rows":[{"series", "number","date","description","row_description","debit_ore","credit_ore", @@ -519,7 +523,8 @@ support `dry_run`, which validates without writing. | `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 +`#KONTO`, `#IB`, `#UB`, `#RES`, `#VER`, `#TRANS`. `#IB`/`#UB` are written for +balance accounts and `#RES` for P&L accounts, with IB as in §7.6. Import is the migration path from Fortnox/Visma/BL and must be dry-run first; it reports exactly what would be created. diff --git a/docs/STATE.md b/docs/STATE.md index 4d448fe..29fbada 100644 --- a/docs/STATE.md +++ b/docs/STATE.md @@ -72,6 +72,16 @@ unit tests and the docs consistency check. `TUI-GUIDELINES.md`: drafts of encrypted fields (an employee's personnummer) and `Enter` on action rows. Spec in `TUI-GUIDELINES.md` "Interaction model"; decisions in `DECISIONS.md` #28. +- **IB carry-forward (2026-09-22, branch `eff/ib-carry`, not deployed)**: + reports and `sie.export` now carry earlier years' `IB` vouchers into the + opening balance (Makandra's 2021 IB voucher held aktiekapital 2081/1940, + which vanished from every later year) and restart P&L accounts at each + fiscal-year start (they used to accumulate since 2021). SIE writes + `#IB`/`#UB` only for balance accounts and `#RES` only for P&L. With it, + Makandra's 2025/26 opening balance shows the real 17 857,63 kr gap from + 2022/23 (result transfer short of the P&L) instead of hiding it. + `test_core` has `ib_carry`. Touches the same `balance_query` SQL as + `eff/imported-closings` — expect a small textual conflict when merging. - **Mail configuration**: Makandra AB (org 2) has **no** `smtp_*` settings in bokf, so `invoice.send` there is `SMTP_NOT_CONFIGURED` (fine if invoices are sent elsewhere — set them up when wanted). Mock AB (org 1) |
