From 5c86bd56aa3e40d2e98327835a583ee569125036 Mon Sep 17 00:00:00 2001 From: Andreas Knuth Date: Fri, 27 Feb 2026 10:58:07 -0600 Subject: [PATCH] template change --- server.js | 20 ++++++++++---------- templates/invoice-template.html | 19 ++++++++++++++++++- templates/quote-template.html | 18 ++++++++++++++++++ 3 files changed, 46 insertions(+), 11 deletions(-) diff --git a/server.js b/server.js index 5eb6af5..67ff222 100644 --- a/server.js +++ b/server.js @@ -1230,13 +1230,13 @@ app.get('/api/quotes/:id/pdf', async (req, res) => { // Totals itemsHTML += ` - Subtotal: + Subtotal: $${parseFloat(quote.subtotal).toFixed(2)} `; if (!quote.tax_exempt) { itemsHTML += ` - Tax (${quote.tax_rate}%): + Tax (${quote.tax_rate}%): $${parseFloat(quote.tax_amount).toFixed(2)} `; } @@ -1352,13 +1352,13 @@ app.get('/api/invoices/:id/pdf', async (req, res) => { itemsHTML += ` - Subtotal: + Subtotal: $${parseFloat(invoice.subtotal).toFixed(2)} `; if (!invoice.tax_exempt) { itemsHTML += ` - Tax (${invoice.tax_rate}%): + Tax (${invoice.tax_rate}%): $${parseFloat(invoice.tax_amount).toFixed(2)} `; } @@ -1374,7 +1374,7 @@ app.get('/api/invoices/:id/pdf', async (req, res) => { if (amountPaid > 0) { itemsHTML += ` - Downpayment: + Downpayment: -$${amountPaid.toFixed(2)} @@ -1490,13 +1490,13 @@ app.get('/api/quotes/:id/html', async (req, res) => { itemsHTML += ` - Subtotal: + Subtotal: $${parseFloat(quote.subtotal).toFixed(2)} `; if (!quote.tax_exempt) { itemsHTML += ` - Tax (${quote.tax_rate}%): + Tax (${quote.tax_rate}%): $${parseFloat(quote.tax_amount).toFixed(2)} `; } @@ -1595,13 +1595,13 @@ app.get('/api/invoices/:id/html', async (req, res) => { itemsHTML += ` - Subtotal: + Subtotal: $${parseFloat(invoice.subtotal).toFixed(2)} `; if (!invoice.tax_exempt) { itemsHTML += ` - Tax (${invoice.tax_rate}%): + Tax (${invoice.tax_rate}%): $${parseFloat(invoice.tax_amount).toFixed(2)} `; } @@ -1617,7 +1617,7 @@ app.get('/api/invoices/:id/html', async (req, res) => { if (amountPaid > 0) { itemsHTML += ` - Downpayment: + Downpayment: -$${amountPaid.toFixed(2)} diff --git a/templates/invoice-template.html b/templates/invoice-template.html index 74aff1b..be5705e 100644 --- a/templates/invoice-template.html +++ b/templates/invoice-template.html @@ -179,12 +179,29 @@ } .total-label { + text-align: right; + font-size: 16px; + font-weight: bold; + padding-right: 20px !important; + } + .subtotal-label { + text-align: right; + font-size: 14px; + font-weight: bold; + padding-right: 20px !important; + } + .tax-label { + text-align: right; + font-size: 14px; + font-weight: bold; + padding-right: 20px !important; + } + .downpayment-label { text-align: right; font-size: 14px; font-weight: bold; padding-right: 20px !important; } - .total-amount { text-align: right; font-size: 14px; diff --git a/templates/quote-template.html b/templates/quote-template.html index 9932192..4637c53 100644 --- a/templates/quote-template.html +++ b/templates/quote-template.html @@ -175,6 +175,24 @@ } .total-label { + text-align: right; + font-size: 16px; + font-weight: bold; + padding-right: 20px !important; + } + .subtotal-label { + text-align: right; + font-size: 14px; + font-weight: bold; + padding-right: 20px !important; + } + .tax-label { + text-align: right; + font-size: 14px; + font-weight: bold; + padding-right: 20px !important; + } + .downpayment-label { text-align: right; font-size: 14px; font-weight: bold;