load invoice templates from JSON files via backend
Templates are now loaded dynamically from data/templates/*.json via the get_invoice_templates Tauri command instead of being hardcoded in TypeScript. Preview and PDF renderer switch on template.layout instead of template.id, allowing custom templates to reuse built-in layouts with different colors.
This commit is contained in:
@@ -1825,7 +1825,7 @@ export function renderInvoicePdf(
|
||||
items: InvoiceItem[],
|
||||
businessInfo: BusinessInfo,
|
||||
): jsPDF {
|
||||
switch (config.id) {
|
||||
switch (config.layout) {
|
||||
case 'clean': return renderClean(config, invoice, client, items, businessInfo)
|
||||
case 'professional': return renderProfessional(config, invoice, client, items, businessInfo)
|
||||
case 'bold': return renderBold(config, invoice, client, items, businessInfo)
|
||||
|
||||
Reference in New Issue
Block a user