11621bb79f
* feat: add script to import Skatteverket monthly tax tables as fallback TypeScript module
- Implemented a new script `import-tax-tables.ts` to parse fixed-width TXT tax tables from Skatteverket (SKV 434).
- The script generates a TypeScript module for emergency fallback when the Skatteverket open-data API is unavailable.
- Supports command-line argument for specifying the year and handles parsing of B-rows only.
- Outputs a structured TypeScript file containing tax data for specified years.
* feat: gate salary module behind dev-only flag
Temporarily disable the Lön module in production while the feature is
being completed. Sidebar entries ("Löner", "Anställda") still render but
are not clickable and show a "Kommer snart" badge. Middleware redirects
/salary* to / and returns 404 on /api/salary/* so the feature can't be
reached by direct URL. All gates check NODE_ENV === 'development' so
local dev keeps full access for continued development.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
* feat: refactor bank file import wizard to streamline column mapping and enhance CSV handling
* fix: bump migration timestamp to avoid collision with logos_bucket
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
* feat: enhance AGI generation and salary entry calculations with improved status checks and error handling
---------
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
25 lines
1.2 KiB
SQL
25 lines
1.2 KiB
SQL
-- Drop phantom 4-argument overload of commit_journal_entry.
|
|
--
|
|
-- The canonical definition in 20260402100200_atomic_commit_entry.sql has the
|
|
-- signature (p_company_id uuid, p_entry_id uuid). A 4-argument overload
|
|
-- (p_company_id uuid, p_entry_id uuid, p_commit_method text, p_rubric_version text)
|
|
-- was observed in at least one database but has never existed in source
|
|
-- control. It is orphaned — no code calls it and no migration creates it.
|
|
--
|
|
-- Its presence causes the 2-argument RPC call in lib/bookkeeping/engine.ts
|
|
-- (`supabase.rpc('commit_journal_entry', { p_company_id, p_entry_id })`)
|
|
-- to fail with:
|
|
-- "Could not choose the best candidate function between:
|
|
-- public.commit_journal_entry(p_company_id => uuid, p_entry_id => uuid),
|
|
-- public.commit_journal_entry(p_company_id => uuid, p_entry_id => uuid,
|
|
-- p_commit_method => text, p_rubric_version => text)"
|
|
-- because PostgREST's named-argument dispatch is ambiguous when both overloads
|
|
-- are reachable.
|
|
--
|
|
-- This migration drops the orphaned overload. IF EXISTS makes it a no-op on
|
|
-- databases that never had the phantom function.
|
|
|
|
DROP FUNCTION IF EXISTS public.commit_journal_entry(uuid, uuid, text, text);
|
|
|
|
NOTIFY pgrst, 'reload schema';
|