feat(accounting): consolidate VAT/financial config into Settings → Accounting

- Remove the orphaned "Default VAT rate %" from Business profile; the rates
  are the Accounting VAT codes. The invoice/quote VAT picker (VatRateSelect)
  is now code-only — options are exactly the Accounting output codes, no
  free-text custom rate. Off-list legacy values on existing invoices are
  preserved as a read-only "(not configured)" option so issued documents
  aren't silently changed.
- Move VAT label + default hourly rate to the Accounting tab (new
  AccountingProfileFields card; storage stays on business_profile, own save).
  Wire vat_label onto the PDF VAT-line label via the issuer block (covers
  invoices + quotes), falling back to the locale default when blank.
- Default currency stays on Business profile but becomes a normalizing
  dropdown (an old free-text "chf" auto-selects "CHF"; unknown values
  preserved). Add a moved-note callout. Strip the moved fields from the
  Business-profile save so it can't clobber an Accounting-tab edit.
This commit is contained in:
Luca
2026-06-18 15:10:44 +02:00
parent 315d15afd4
commit dc7b87bb87
7 changed files with 183 additions and 58 deletions
+4
View File
@@ -73,6 +73,10 @@ function buildIssuerBlock(profile, logoPath, options = {}) {
// PDF issuer block — §14 UStG requires one or both on every
// invoice. Kleinunternehmer without a USt-IdNr. carry only this.
taxId: profile.tax_id || null,
// VAT-line label on the totals block (e.g. "MwSt.", "VAT"). Falls back to
// the per-locale default in pdfService when blank. Configured under
// Settings → Accounting.
vatLabel: profile.vat_label || null,
// pre-resolved absolute path; renderer never re-resolves.
logoPath,
pdfFontTtfPath: profile.pdf_font_ttf_path,