feat(supplier-invoices): Inlagd i banken mark for payments entered by hand (#2220) (#2356)

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:
Jakob Wennberg
2026-09-06 21:05:43 +02:00
committed by GitHub
co-authored by Jakob Wennberg Claude Fable 5.1
parent 6906bc4aa2
commit 6a5fd6cd00
14 changed files with 770 additions and 12 deletions
+7
View File
@@ -1224,6 +1224,13 @@ export interface SupplierInvoice {
// creation and mark-paid is rejected by the existing status guard.
paid_with_private_funds: boolean
/**
* "Inlagd i banken" (#2220): the user entered this payment in the internet
* bank by hand; money not yet gone. A mellanlage between attesterad and
* betald, never a status. Cleared by a DB trigger when a payment lands.
*/
bank_entered_at: string | null
notes: string | null
// Default dimensions bag ({sie_dim_no: code}, e.g. {"1":"KS01","6":"P001"})