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:
Luca
2026-06-16 00:20:59 +02:00
parent 6e1924bae8
commit 2479d87afc
4 changed files with 18 additions and 2 deletions
+2
View File
@@ -180,6 +180,8 @@ export interface InvoiceCreatePayload {
installmentLabel?: string;
installmentTrigger?: string;
vatRate?: number;
/** Migration 130 — snapshot of the chosen output VAT code (null = custom rate). */
vatCode?: string | null;
shippingAmountMinor?: number;
ccPdfEmail?: string;
// null = explicitly clear the per-invoice override (back to the