aboutsummaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
Diffstat (limited to 'docs')
-rw-r--r--docs/PROTOCOL.md14
-rw-r--r--docs/STATE.md11
2 files changed, 21 insertions, 4 deletions
diff --git a/docs/PROTOCOL.md b/docs/PROTOCOL.md
index 0b69d53..3ddb03b 100644
--- a/docs/PROTOCOL.md
+++ b/docs/PROTOCOL.md
@@ -465,8 +465,9 @@ closed straight to 2099 and would otherwise net to zero; the TUI
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",
-"saldo_ore"}]}]}`; accounts without IB or period movement are omitted, and
+"number","date","description","row_description","source","debit_ore",
+"credit_ore","saldo_ore"}]}]}` (`source` is the voucher's origin, e.g.
+`sie_import`); accounts without IB or period movement are omitted, and
`accounts` (array of account numbers) filters the list.
`report.voucher_list` (verifikationslista) returns `{"fiscal_year","from",
"to","last_voucher":{...},"vouchers":[{"id","series","number","date",
@@ -476,8 +477,13 @@ returns account blocks:
`INFO.SRU` (submitter, defaults to the org) and `BLANKETTER.SRU` with one
INK2, INK2R and INK2S block each. The blankett type is derived from the
fiscal year end (`<inkomstår>P1`-`P4`), the org number is written as 12
-digits, amounts are whole kronor with öre truncated and the blankett's
-printed sign, and zero fields are omitted. INK2R is mapped from the ledger
+digits, amounts are whole kronor with the blankett's printed sign, and zero
+fields are omitted. Every account is rounded to whole kronor (half away
+from zero) before it is summed into its field, the same rule as the TUI
+årsredovisning, so the two agree to the krona and the fields add up; 2099
+is replaced by the income statement's result in 7302, and the krona that
+rounding can leave between the balance sheet's sides is carried by 7302
+(a real imbalance in the ledger stays visible). INK2R is mapped from the ledger
via the official BAS ranges; INK2S takes the derived årets resultat and
skatt plus `adjustments[]{code,amount_ore}` for manual tax adjustments and
computes 7670/7770; INK2 carries 7104/7114 and the optional 8040-8045
diff --git a/docs/STATE.md b/docs/STATE.md
index f481524..7f90303 100644
--- a/docs/STATE.md
+++ b/docs/STATE.md
@@ -110,6 +110,17 @@ unit tests and the docs consistency check.
exactly on the filed 2025/26 UB; only öre diffs remain in history (2512
1,63, 2099 1,07, moms 0,56). 2021/22 was reopened for V 25 and must be
closed again by the owner.
+- **Whole-krona rounding (2026-09-22, not deployed)**: the SRU export and
+ the TUI årsredovisning round every account to whole kronor
+ (`util_round_kr`) and sum those, so their lines, totals and INK2 fields
+ agree to the krona (the SRU export used to truncate each field, the
+ årsredovisning rounded each line). The balance sheet's rounding krona goes
+ to Balanserat resultat / 7302, and 2099 is replaced by the year's result
+ in both. The årsredovisning's "Stäng" skip never matched (`strncmp` with 7
+ bytes for the 6-byte "Stäng"), so imported years showed a zero result; it
+ now follows the server rule (SIE-imported only) via the new `source` field
+ on `report.general_ledger` rows. The total "Summa eget kapital,
+ avsättningar och skulder" no longer counts 2099 on top of the result.
- **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)