feat(recurring): carry dimension bags on recurring invoice schedules (#1272)
Schedules and their template items now store {sie_dim_no: code} bags
(default_dimensions / dimensions), and the cron generator copies them
onto every spawned invoice + item, so recurring invoices book with the
same projekt/kostnadsstalle tags a manual invoice would. Wired through
the web CRUD routes, the staged-operation executors, and the MCP
create/update/list schedule tools (resolve-don't-select, resolutions
echoed in the preview).
Migration 20260728090000 adds the two jsonb columns (same shape+CHECK
as invoices/invoice_items, PR7 producer parity).
Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Fable 5
parent
65c6d4c178
commit
951b33363b
@@ -1242,6 +1242,10 @@ export interface RecurringInvoiceSchedule {
|
||||
our_reference: string | null
|
||||
notes: string | null
|
||||
|
||||
// Dimension bag {sie_dim_no: code} copied onto every generated invoice's
|
||||
// default_dimensions at spawn time.
|
||||
default_dimensions?: Record<string, string>
|
||||
|
||||
auto_send: boolean
|
||||
status: RecurringInvoiceScheduleStatus
|
||||
|
||||
@@ -1269,6 +1273,9 @@ export interface RecurringInvoiceScheduleItem {
|
||||
unit_price: number
|
||||
// null = inherit customer's default VAT rate at spawn time
|
||||
vat_rate: number | null
|
||||
// Per-item bag copied onto the generated invoice_items.dimensions; merges
|
||||
// over the schedule default on that item's revenue line.
|
||||
dimensions?: Record<string, string>
|
||||
created_at: string
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user