Files
accounted/lib
Jakob WennbergandClaude Fable 5 d182cf5d93 refactor(bokslut): convert periodiseringsfond balance query off the journal_entries!inner embed (#977) (#1047)
listExistingPeriodiseringsfonder still selected from journal_entry_lines
with a journal_entries!inner embed and put company_id/status/entry_date on
the embedded side: the shape PostgREST compiles to a correlated lateral
that scans all tenants' lines, and it silently truncated at the 1000-row
cap because it was unpaginated. Convert it to the shared two-step
fetchEntryLines helper (lib/bookkeeping/entry-lines.ts), mirroring
bolagsskatt-calculator.ts, and keep the existing wrapped error contract.

Adds unit coverage for listExistingPeriodiseringsfonder: helper call
shape, entry/line filter callbacks, per-account balance aggregation,
2129 cohort collision rule, 6-year must-return flag, near-zero drop,
sorting, and error wrapping.

Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
2026-07-17 11:51:03 +02:00
..
2026-07-08 20:19:02 +02:00
2026-07-17 00:52:57 +02:00
2026-07-15 15:53:15 +02:00
2026-07-07 01:14:59 +02:00
2026-07-17 00:52:57 +02:00
2026-07-05 03:05:09 +02:00
2026-07-17 00:52:57 +02:00
2026-07-17 00:52:57 +02:00
2026-07-15 15:53:15 +02:00
2026-07-12 19:14:12 +02:00
2026-07-13 22:54:33 +02:00
2026-07-15 15:53:15 +02:00
2026-07-12 19:14:12 +02:00
2026-07-15 15:53:15 +02:00
2026-07-15 15:53:15 +02:00
2026-07-13 22:54:33 +02:00
2026-04-22 18:14:01 +02:00
2026-07-15 15:53:15 +02:00
2026-07-13 22:54:33 +02:00
2026-07-12 19:14:12 +02:00
2026-05-28 15:43:48 +02:00
2026-07-17 00:52:57 +02:00
2026-07-15 15:53:15 +02:00