diff options
| author | Anders Betts <anders.betts@gmail.com> | 2026-09-18 14:32:23 +0200 |
|---|---|---|
| committer | Anders Betts <anders.betts@gmail.com> | 2026-09-18 14:32:23 +0200 |
| commit | a5d3ddf6d512bc459cfa450c6b449c2e7a245373 (patch) | |
| tree | e14c2b28e3cd6d7b744f301b5bf498f5feb8f03e /docs/SCHEMA.md | |
| parent | 07b5e5890fedbf71a1503f984dfbc2baa872223c (diff) | |
| download | bokf-0.1.26.tar.gz bokf-0.1.26.zip | |
reports: Kapitas-style TUI tables, corrected moms rules (schema v3)v0.1.26
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.
Diffstat (limited to 'docs/SCHEMA.md')
| -rw-r--r-- | docs/SCHEMA.md | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/docs/SCHEMA.md b/docs/SCHEMA.md index 4b22271..db03e43 100644 --- a/docs/SCHEMA.md +++ b/docs/SCHEMA.md @@ -393,6 +393,11 @@ is editable by owners when Skatteverket changes the blankett. The seed rules are data, not code: the system ships a reviewed default set per fiscal year and keeps older sets for older years. +Several rules may target the same `box`; `report.vat` sums them into one entry +per box. Ruta 49 is the sum of the payable boxes only (`10`,`11`,`12`,`30`, +`31`,`32`,`48`,`60`,`61`,`62`); the other boxes are underlag and never change +what is payable. + ### 10.1 Voucher templates (schema v2) Konteringsmallar: named sets of rows with a formula over the variable `x`. @@ -459,7 +464,8 @@ another voucher is posted in between) — clients must not persist it. ## 12. Migrations and versioning - `meta(key TEXT PRIMARY KEY, value TEXT)` holds `schema_version` (integer) - and `created_at`. Current version: **2** (v2 adds the two template tables). + and `created_at`. Current version: **3** (v3 replaces the seeded moms rules + with the corrected mapping; v2 adds the two template tables). - Migrations are forward-only, applied automatically at daemon start, each in one transaction, and require an automatic `VACUUM INTO` snapshot next to the database before starting (`bokfd.db.pre-migration-<version>`). |
