summaryrefslogtreecommitdiff
path: root/docs/PROTOCOL.md
diff options
context:
space:
mode:
authorAnders Betts <anders.betts@gmail.com>2026-09-18 21:35:10 +0200
committerAnders Betts <anders.betts@gmail.com>2026-09-18 21:35:10 +0200
commit251eb8c54c77029f0b43aa987ea50c44016147f3 (patch)
tree2bf4284ce2daab191d48579a6c5a84882060d398 /docs/PROTOCOL.md
parent64c0d5d79b31dafcbdb68ff938a92bd6f136d4a7 (diff)
downloadbokf-251eb8c54c77029f0b43aa987ea50c44016147f3.tar.gz
bokf-251eb8c54c77029f0b43aa987ea50c44016147f3.zip
eskd: generate the momsdeklaration file (eSKDUpload 6.0)v0.1.28
report.vat_eskd builds the ISO-8859-1 XML from report.vat: whole kronor with öre truncated like the blankett, box 48 positive as filed, MomsBetala computed from the whole-krona boxes, and an optional upplysning converted from UTF-8, XML-escaped and capped at 300 characters. The TUI momsrapport gains "s = spara eSKD", prompting for a path and writing the bytes verbatim. Verified against the FY2027 Kapitas report: 05=703200, 10=175800, 20=1453, 30=851, 48=1030, 49=175621.
Diffstat (limited to 'docs/PROTOCOL.md')
-rw-r--r--docs/PROTOCOL.md8
1 files changed, 7 insertions, 1 deletions
diff --git a/docs/PROTOCOL.md b/docs/PROTOCOL.md
index b8ec759..e3e629b 100644
--- a/docs/PROTOCOL.md
+++ b/docs/PROTOCOL.md
@@ -367,6 +367,7 @@ vouchers at posting time (`attachment_ids`) or afterwards via
| `report.general_ledger` | `fiscal_year`, `accounts?`, `from?`, `to?` | huvudbok |
| `report.voucher_list` | `fiscal_year`, `series?` | grundbok/verifikationslista |
| `report.vat` | `from`, `to`, `period_type?` | momsdeklaration ruta för ruta |
+| `report.vat_eskd` | `from`, `to`, `upplysning?` | eSKD XML (ISO-8859-1) as `content_base64` |
All reports are pure reads, respect locks, and return JSON rows. Amounts are
öre. `report.general_ledger` (huvudbok) returns account blocks:
@@ -379,7 +380,12 @@ All reports are pure reads, respect locks, and return JSON rows. Amounts are
"to","last_voucher":{...},"vouchers":[{"id","series","number","date",
"description","rows":[{"account","name","debit_ore","credit_ore",
"description"}]}],"totals":{"debit_ore","credit_ore"}}` and takes an
-optional `series` filter. Both cover the whole fiscal year; the ledger's
+`series` filter. `report.vat_eskd` builds Skatteverket's `eSKDUpload`
+Version 6.0 XML for the period ending at `to` (whole kronor, öre truncated
+like the blankett; box 48 positive as filed) and returns `{"org_nr",
+"period","from","to","filename","sha256","size","content_base64"}`; the
+bytes are ISO-8859-1, so write them verbatim to a `.xml` file. Both cover
+the whole fiscal year; the ledger's
period can be narrowed with `from`/`to`. `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