fix(salary): make pain.001 betalfil generatable (company IBAN + BIC) (#950)
The ISO 20022 pain.001 salary payment file could never be generated: the route required company_settings.iban/bic, but no settings screen wrote those columns, so every request returned 400. The specific reason was also swallowed by getErrorMessage (isSwedishUserMessage did not know "krävs"/"saknar"), surfacing only the generic "Förfrågan innehåller ogiltiga uppgifter" (issue #945). - Add IBAN + BIC inputs to Settings > Fakturering > Bankuppgifter. BIC auto-derives from the clearing number / bank already entered, so in practice only the IBAN is typed. Validated client- and server-side. - Route requires the company IBAN (canonical debtor form every Swedish bank accepts) and derives the BIC, with clear actionable errors. - Employees are unchanged: domestic clearing + account (BBAN), which is what Swedish payroll collects. Only the company (debtor) uses IBAN. - getErrorMessage recognizes "krävs"/"saknar" so payment-file reasons surface instead of the generic 400. Fixes #945 Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 4.8
parent
bacc5914af
commit
c1ea0d9bf2
+7
-1
@@ -1330,7 +1330,13 @@
|
||||
"plusgiro_error": "Invalid plusgiro number",
|
||||
"swish_label": "Swish",
|
||||
"swish_placeholder": "123 XXX XX XX or 07X XXX XX XX",
|
||||
"swish_error": "Invalid Swish number (business number 123XXXXXXX or mobile number 07XXXXXXXX)"
|
||||
"swish_error": "Invalid Swish number (business number 123XXXXXXX or mobile number 07XXXXXXXX)",
|
||||
"iban_label": "IBAN",
|
||||
"iban_error": "Invalid IBAN (SE followed by 22 digits)",
|
||||
"iban_hint": "Required for the payment file (ISO 20022) when paying salaries",
|
||||
"bic_label": "BIC/SWIFT",
|
||||
"bic_placeholder": "Filled in automatically",
|
||||
"bic_error": "Invalid BIC/SWIFT (8 or 11 characters)"
|
||||
},
|
||||
"settings_invoice_form": {
|
||||
"default_our_reference_label": "Default \"Our reference\"",
|
||||
|
||||
+7
-1
@@ -1330,7 +1330,13 @@
|
||||
"plusgiro_error": "Ogiltigt plusgironummer",
|
||||
"swish_label": "Swish",
|
||||
"swish_placeholder": "123 XXX XX XX eller 07X XXX XX XX",
|
||||
"swish_error": "Ogiltigt Swish-nummer (företagsnummer 123XXXXXXX eller mobilnummer 07XXXXXXXX)"
|
||||
"swish_error": "Ogiltigt Swish-nummer (företagsnummer 123XXXXXXX eller mobilnummer 07XXXXXXXX)",
|
||||
"iban_label": "IBAN",
|
||||
"iban_error": "Ogiltigt IBAN (SE följt av 22 siffror)",
|
||||
"iban_hint": "Krävs för betalfil (ISO 20022) vid löneutbetalning",
|
||||
"bic_label": "BIC/SWIFT",
|
||||
"bic_placeholder": "Fylls i automatiskt",
|
||||
"bic_error": "Ogiltig BIC/SWIFT (8 eller 11 tecken)"
|
||||
},
|
||||
"settings_invoice_form": {
|
||||
"default_our_reference_label": "Standard för Vår referens",
|
||||
|
||||
Reference in New Issue
Block a user