Fix/invoice delivery and payment accounts (#1116)
* fix: reconcile annual reports with final closing entries * test: cover annual report depreciation and VAT balances * Merge remote-tracking branch 'origin/main' into fix/usr-fdbck-ch * fix: show exact invoice delivery details * fix: use currency account in invoice emails * fix: address invoice delivery review feedback * fix: harden invoice delivery and payment accounts * test: assert RLS-denied zero-row updates * fix: close remaining invoice compliance gaps * fix: harden invoice archive authorization * fix: close invoice delivery review findings * fix: verify delivery finalization results * fix: cap combined invoice email recipients * fix: close final invoice compliance findings * fix: prevent stale payment account saves * test: prove invoice delivery isolation * fix: close invoice privacy review findings * test: normalize delivery retention dates
This commit is contained in:
@@ -885,11 +885,25 @@ const INVOICE: Record<string, StructuredErrorEntry> = {
|
||||
message_en: 'Customer has no email address.',
|
||||
remediation: { description: 'Add an email address on the customer record before sending.' },
|
||||
},
|
||||
INVOICE_SEND_TOO_MANY_RECIPIENTS: {
|
||||
httpStatus: 400,
|
||||
message_sv: 'Ett fakturautskick får ha högst 20 mottagare totalt.',
|
||||
message_en: 'An invoice email may have at most 20 recipients in total.',
|
||||
remediation: { description: 'Remove CC or BCC recipients before sending the invoice.' },
|
||||
},
|
||||
INVOICE_SEND_COMPANY_SETTINGS_MISSING: {
|
||||
httpStatus: 404,
|
||||
message_sv: 'Företagsinställningar saknas.',
|
||||
message_en: 'Company settings are missing.',
|
||||
},
|
||||
INVOICE_SEND_PAYMENT_ACCOUNT_MISSING: {
|
||||
httpStatus: 400,
|
||||
message_sv: 'Fakturan saknar ett betalningskonto för vald valuta. Lägg till kontot under Fakturering innan du skapar PDF-filen eller skickar fakturan.',
|
||||
message_en: 'The invoice has no payment account for its currency. Add the account under Invoicing before generating the PDF or sending the invoice.',
|
||||
remediation: {
|
||||
description: 'Lägg till ett betalningskonto med IBAN för fakturans valuta under Fakturering.',
|
||||
},
|
||||
},
|
||||
INVOICE_SEND_NUMBER_ASSIGN_FAILED: {
|
||||
httpStatus: 500,
|
||||
message_sv: 'Kunde inte tilldela fakturanummer.',
|
||||
@@ -2848,8 +2862,8 @@ const BOLAGSVERKET: Record<string, StructuredErrorEntry> = {
|
||||
},
|
||||
ARSREDOVISNING_INCOMPLETE: {
|
||||
httpStatus: 409,
|
||||
message_sv: 'Årsredovisningen har blockerande kontrollfel och kan inte låsas ännu.',
|
||||
message_en: 'The annual report has blocking validation errors and cannot be finalized yet.',
|
||||
message_sv: 'Årsredovisningen har blockerande kontrollfel och kan inte versionssparas ännu.',
|
||||
message_en: 'The annual report has blocking validation errors and cannot be versioned yet.',
|
||||
retryable: false,
|
||||
},
|
||||
ARSREDOVISNING_VERSION_NOT_SIGNABLE: {
|
||||
|
||||
Reference in New Issue
Block a user