fix(import): SIE bulk-delete on service client + provider/reporting/b… (#724)

* fix(import): SIE bulk-delete on service client + provider/reporting/banking fixes

Rebuilt branch onto main as a single commit.

- import: run SIE bulk-delete RPCs on the service client to escape the 8s
  statement_timeout; undo_sie_import now takes an explicit actor (p_user_id)
  so its owner/admin gate works when auth.uid() is NULL on the service
  client (migration 20260624120000) + pg-real regression test
- providers: distinguish missing Fortnox license from expired connection;
  provider_consent_tokens PK regression test
- reports: include unmapped BAS expense groups in the income statement
- enable-banking: reconnect closed/expired bank sessions in place
- bookkeeping: surface linked invoices as underlag on the verifikat view
- scripts: track BL cleanup/diagnostic tooling; data files (*.csv) are
  git-ignored and consentId is now a required arg with no silent default

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* fix(import): add Cache-Control header to journal entry references response

---------

Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
Mattsson
2026-06-14 23:40:26 +02:00
committed by GitHub
co-authored by Claude Opus 4.8
parent db8983ba9e
commit 43925bc2d3
37 changed files with 2456 additions and 1152 deletions
+8
View File
@@ -3150,6 +3150,11 @@
"attachments_title": "Documents",
"attachments_count": "{count} documents",
"no_attachments": "No documents attached",
"references_count": "{count, plural, one {# reference} other {# references}}",
"references_title": "Linked supporting documents",
"references_subtitle": "Reference to the invoice that identifies the transaction — part of the audit trail.",
"reference_invoice": "Customer invoice {number}",
"reference_supplier_invoice": "Supplier invoice {number}",
"currency_title": "Currency conversion",
"currency_rate": "Rate",
"currency_original_amount": "Original amount",
@@ -3556,6 +3561,9 @@
"bank_sync_new_since_last_visit_one": "1 new bank transaction since your last visit",
"bank_sync_new_since_last_visit_many": "{count} new bank transactions since your last visit",
"bank_sync_new_since_last_visit_dismiss": "Dismiss",
"bank_reconnect": "Reconnect",
"bank_sync_session_expired": "Bank connection expired",
"bank_sync_session_expired_desc": "Reconnect to keep syncing transactions.",
"import_psd2_active_warning_title": "PSD2 is active for {bankName}",
"import_psd2_active_warning_body": "Transactions sync automatically each night. File imports are only needed for older history or when PSD2 isn't working — otherwise duplicates may occur."
},
+8
View File
@@ -3150,6 +3150,11 @@
"attachments_title": "Underlag",
"attachments_count": "{count} dokument",
"no_attachments": "Inga underlag bifogade",
"references_count": "{count, plural, one {# hänvisning} other {# hänvisningar}}",
"references_title": "Kopplat underlag",
"references_subtitle": "Hänvisning till fakturan som identifierar affärshändelsen — del av verifieringskedjan.",
"reference_invoice": "Kundfaktura {number}",
"reference_supplier_invoice": "Leverantörsfaktura {number}",
"currency_title": "Valutaomräkning",
"currency_rate": "Kurs",
"currency_original_amount": "Ursprungsbelopp",
@@ -3556,6 +3561,9 @@
"bank_sync_new_since_last_visit_one": "1 ny banktransaktion sen ditt senaste besök",
"bank_sync_new_since_last_visit_many": "{count} nya banktransaktioner sen ditt senaste besök",
"bank_sync_new_since_last_visit_dismiss": "Stäng",
"bank_reconnect": "Förnya anslutning",
"bank_sync_session_expired": "Bankanslutningen har löpt ut",
"bank_sync_session_expired_desc": "Förnya anslutningen för att fortsätta synka transaktioner.",
"import_psd2_active_warning_title": "PSD2 är aktivt för {bankName}",
"import_psd2_active_warning_body": "Transaktioner synkas automatiskt varje natt. Filimport behövs bara för äldre historik eller om PSD2 inte fungerar — annars kan dubbletter uppstå."
},