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
@@ -1397,6 +1397,16 @@ export const MarkSupplierInvoicePaidSchema = z.object({
|
||||
})).min(2).optional(),
|
||||
})
|
||||
|
||||
/**
|
||||
* "Inlagd i banken" (#2220): a boolean mark, not a payment. `entered: true`
|
||||
* records that the user typed the payment into the bank by hand; `false`
|
||||
* takes the mark back. No amount, no date: the payment itself is still
|
||||
* recorded by mark-paid or the bank match, which also clears the mark.
|
||||
*/
|
||||
export const SupplierInvoiceBankEnteredSchema = z.object({
|
||||
entered: z.boolean(),
|
||||
})
|
||||
|
||||
export const UpdateSupplierInvoiceSchema = z.object({
|
||||
supplier_invoice_number: z.string().min(1).optional(),
|
||||
invoice_date: isoDate.optional(),
|
||||
|
||||
Reference in New Issue
Block a user