Files
accounted/lib
Mattsson 8ed943198f fix: allow retroactive first fiscal year via SIE import (#265)
The enforce_period_start_day trigger and its sie-import pre-validation
rejected any non-first-of-month period_start whenever *any other* fiscal
period existed for the company. That blocked a real user flow: after
onboarding creates a default period (e.g. current year, day 1), importing
an SIE for an older förlängt första räkenskapsår (e.g. 2017-07-28 –
2018-12-31) failed with "Non-first fiscal period must start on the 1st
of a month".

Per BFL 3 kap., the chronologically first fiscal year is the one that
may be 6–18 months and start mid-month — which is a property of *when*
the period starts relative to others, not of insert order. The trigger
and pre-validation now allow mid-month start iff no existing period
starts earlier.

Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-18 10:26:02 +02:00
..
2026-04-15 20:55:29 +02:00
2026-04-15 11:17:39 +02:00
2026-03-21 00:47:54 +01:00
2026-04-11 17:06:32 +02:00
2026-02-24 16:06:36 +01:00
2026-04-09 16:22:51 +02:00
2026-04-15 11:17:39 +02:00
2026-04-15 20:55:29 +02:00
2026-04-07 10:30:20 +02:00
2026-04-11 17:06:32 +02:00
2026-04-08 18:17:00 +02:00
2026-04-15 11:17:39 +02:00
2026-04-11 17:06:32 +02:00
2026-04-15 11:17:39 +02:00
2026-02-24 10:02:13 +01:00
2026-04-09 16:22:51 +02:00