feat(accounting): bill editor VAT dropdown + GET returns vat_code snapshot
Slice 2 + 1b: - Bill editor: VAT-rate field → VatRateSelect dropdown (mirrors the quote editor); snapshots vatCode on create + carries it from a source quote. - getQuoteById + the invoice serializer now return vat_code, so re-editing a saved document preserves the snapshot instead of falling back to the rate→code map. Payload types (quotes + bills) carry vatCode. 72 tests pass; build green.
This commit is contained in:
@@ -1780,6 +1780,8 @@ async function buildInvoiceRenderContext(invoice, lineItems) {
|
||||
totals: {
|
||||
netAmountMinor: invoice.net_amount_minor,
|
||||
vatRate: invoice.vat_rate,
|
||||
// Migration 130 — VAT-code snapshot (so re-editing preserves it).
|
||||
vatCode: invoice.vat_code ?? null,
|
||||
vatAmountMinor: invoice.vat_amount_minor,
|
||||
shippingAmountMinor: invoice.shipping_amount_minor,
|
||||
totalAmountMinor: invoice.total_amount_minor,
|
||||
|
||||
Reference in New Issue
Block a user