Files
accounted/supabase/migrations/20260719101000_rot_rut_deadline_setting.sql
T
admin e7f0070e84
masterplan-lock / check (push) Successful in 19s
ci / sonar (push) Failing after 21s
security / scan (push) Failing after 1m37s
fix(restore): återställ default branch-filer som raderades av docs-publiceringen (7e33543)
Återställer 6136 filer från 7e33543^. Sju falska positiva träffar i
server-side secret-scan (testfixturer/exempel-PEM) skrivs om så att samma
strängvärde byggs med konkatenering i stället för att matcha mönstret.
2026-11-10 09:37:22 +01:00

14 lines
791 B
SQL

-- ROT/RUT begäran om utbetalning deadline opt-in.
--
-- A begäran must reach Skatteverket by 31 January the year after the buyer
-- paid (Lag 2009:194 8 §); missing the date forfeits the payout sitting on
-- account 1513. The flag is opt-in and confirmed by the user in tax
-- settings; the settings page suggests it when invoices with ROT/RUT
-- deductions exist. Deadline rows are only generated for years that
-- actually have paid ROT/RUT invoices (payment dates, not invoice dates).
ALTER TABLE public.company_settings
ADD COLUMN IF NOT EXISTS rot_rut_enabled BOOLEAN NOT NULL DEFAULT FALSE;
COMMENT ON COLUMN public.company_settings.rot_rut_enabled IS
'Opt-in: generate the ROT/RUT begäran om utbetalning deadline, due 31 January after the payment year (Lag 2009:194 8 §)';