A user who types payments into the internet bank instead of uploading a
betalfil had no way to see which invoices were already handled. Adds a
nullable supplier_invoices.bank_entered_at, a POST
/api/supplier-invoices/{id}/bank-entered route, a labelled checkbox on
the list (trailing slot, once attested) and on the detail header, and a
BEFORE UPDATE trigger that clears the mark when a payment lands, so
every payment path (mark-paid, bank match, v1, MCP) retires it without
knowing it exists. Markera som betald stays a separate action.
Claude-Session: https://claude.ai/code/session_01LvMaHcTnwAfxzgYD1fGYX1
Co-authored-by: Jakob Wennberg <311770904+jakobwennberg-oss@users.noreply.github.com>
Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Jakob Wennberg
Claude Fable 5.1
parent
6906bc4aa2
commit
6a5fd6cd00
@@ -3025,6 +3025,13 @@ const SUPPLIER_INVOICE_WAVE4: Record<string, StructuredErrorEntry> = {
|
||||
message_sv: 'Leverantörsfakturan kan inte markeras som betald i nuvarande status.',
|
||||
message_en: 'Supplier invoice is not in a payable state.',
|
||||
},
|
||||
SI_BANK_ENTERED_NOT_PAYABLE: {
|
||||
httpStatus: 400,
|
||||
message_sv:
|
||||
'Fakturan kan bara markeras som inlagd i banken när den är godkänd och har något kvar att betala.',
|
||||
message_en:
|
||||
'The invoice can only be marked as entered at the bank while it is approved and has an outstanding amount.',
|
||||
},
|
||||
SI_PAID_PERIOD_LOCKED: {
|
||||
httpStatus: 400,
|
||||
message_sv: 'Bokföringen är låst. Betalningen kan inte registreras.',
|
||||
|
||||
Reference in New Issue
Block a user