From a5d3ddf6d512bc459cfa450c6b449c2e7a245373 Mon Sep 17 00:00:00 2001 From: Anders Betts Date: Fri, 18 Sep 2026 14:32:23 +0200 Subject: reports: Kapitas-style TUI tables, corrected moms rules (schema v3) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The report views dumped JSON; they now render Saldobalans, Resultatrapport (previous-year column, 89xx bokfört/ej bokfört), Balansrapport (Ing balans/Ing saldo/Period/Utg balans, Beräknat resultat) and Momsrapport ruta för ruta, with Swedish amount formatting (1 234,56). The moms starter rules missed 33xx sales, sent reverse-charge VAT 2614 to box 10 instead of 30 and had box 48 positive. Rules may now share a box and report.vat sums them; box 49 is the sum of the moms boxes only. Schema v3 replaces the rules for existing orgs. Verified on a copy of the live DB: 05=703 200, 10=175 800, 20=1 453, 30=851, 48=-1 030, 49=175 621, matching the Kapitas 2027 export. Ctrl+R reload passes --socket and auto-login no longer rewrites tui.conf; pty tests now run through scripts/tui-sandbox.sh so they cannot touch the real config, cache or bw session. --- docs/PROTOCOL.md | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'docs/PROTOCOL.md') diff --git a/docs/PROTOCOL.md b/docs/PROTOCOL.md index 1baf607..35390ae 100644 --- a/docs/PROTOCOL.md +++ b/docs/PROTOCOL.md @@ -367,7 +367,11 @@ vouchers at posting time (`attachment_ids`) or afterwards via | `report.vat` | `from`, `to`, `period_type?` | momsdeklaration ruta för ruta | All reports are pure reads, respect locks, and return JSON rows. Amounts are -öre. `report.vat` returns `{"boxes":[{"box":"05","label":"...","amount_ore":...}],"period":{...}}`. +öre. `report.vat` returns `{"from","to","boxes":[{"box":"05","label":"...","amount_ore":...}],"note"}`. +Rules sharing a box are summed into a single entry. `box 49` is the sum of +the moms boxes (`10`,`11`,`12`,`30`,`31`,`32`,`48`,`60`,`61`,`62`), so box 48 +is signed like the blankett (ingående moms negative); underlag boxes do not +change what is payable. ### 7.7 SIE 4 -- cgit v1.3