Files
accounted/lib
Jakob Wennberg f55bfc478b fix(bookkeeping): three static templates named accounts that break or mis-book (#1397)
Cross-checked all 86 booking templates (26 packs + 60 static) against BAS 2026.
The pack catalogue is clean; the static registry had three defects, none of
which any existing check could see.

Two named accounts that do not exist in BAS 2026, so account-backfill.ts cannot
seed them and EVERY booking through them failed with AccountsNotInChartError:

  vehicle_parking   5614 -> 5619  the BAS 561x run skips 5614; 5619 is the
                                  sibling "Ovriga kostnader for personbilar"
  it_cloud_hosting  5421 -> 5420  BAS has no 5421; both sibling SaaS templates
                                  already use 5420 Programvaror

One that posted successfully to the wrong account, which is worse because
nothing complained:

  travel_hotel      5820 -> 5830  5820 is Hyrbilskostnader. The Hotell template
                                  filed hotel nights under car hire, balanced,
                                  and looked fine. 5830 is "Kost och logi".

An existing test asserted the 5820 behaviour, so the bug was pinned as
expected output. That assertion now reads 5830 and carries the reason.

Adds template-accounts-exist.test.ts so the 5614 class cannot return: every
account any static template names must resolve in BAS 2026, account numbers
must be strings, and a VAT-bearing purchase may not debit equity or revenue.
That last check is deliberately narrow: class 1 is legitimate, equipment_capital
debits 1250 Inventarier and reclaims VAT, which is how capex is booked. Verified
the guard fails on 5614 and passes on 5619 rather than trusting it.

The pack catalogue already had this check via scripts/validate-packs.ts. The
static registry had nothing, which is how it drifted.

Co-authored-by: Jakob Wennberg <311770904+jakobwennberg-oss@users.noreply.github.com>
Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-03 22:55:54 +02:00
..
2026-07-07 01:14:59 +02:00
2026-07-05 03:05:09 +02:00
2026-07-28 19:50:16 +02:00
2026-07-28 19:50:16 +02:00
2026-07-24 15:03:50 +02:00
2026-07-27 16:49:24 +02:00
2026-04-22 18:14:01 +02:00
2026-07-12 19:14:12 +02:00
2026-08-01 16:02:12 +02:00