template change

This commit is contained in:
Andreas Knuth 2026-02-27 10:58:07 -06:00
parent 8ce739d713
commit 5c86bd56aa
3 changed files with 46 additions and 11 deletions

View File

@ -1230,13 +1230,13 @@ app.get('/api/quotes/:id/pdf', async (req, res) => {
// Totals
itemsHTML += `
<tr class="footer-row">
<td colspan="3" class="total-label">Subtotal:</td>
<td colspan="3" class="subtotal-label">Subtotal:</td>
<td class="total-amount">$${parseFloat(quote.subtotal).toFixed(2)}</td>
</tr>`;
if (!quote.tax_exempt) {
itemsHTML += `
<tr class="footer-row">
<td colspan="3" class="total-label">Tax (${quote.tax_rate}%):</td>
<td colspan="3" class="tax-label">Tax (${quote.tax_rate}%):</td>
<td class="total-amount">$${parseFloat(quote.tax_amount).toFixed(2)}</td>
</tr>`;
}
@ -1352,13 +1352,13 @@ app.get('/api/invoices/:id/pdf', async (req, res) => {
itemsHTML += `
<tr class="footer-row">
<td colspan="3" class="total-label">Subtotal:</td>
<td colspan="3" class="subtotal-label">Subtotal:</td>
<td class="total-amount">$${parseFloat(invoice.subtotal).toFixed(2)}</td>
</tr>`;
if (!invoice.tax_exempt) {
itemsHTML += `
<tr class="footer-row">
<td colspan="3" class="total-label">Tax (${invoice.tax_rate}%):</td>
<td colspan="3" class="tax-label">Tax (${invoice.tax_rate}%):</td>
<td class="total-amount">$${parseFloat(invoice.tax_amount).toFixed(2)}</td>
</tr>`;
}
@ -1374,7 +1374,7 @@ app.get('/api/invoices/:id/pdf', async (req, res) => {
if (amountPaid > 0) {
itemsHTML += `
<tr class="footer-row">
<td colspan="3" class="total-label" style="font-size: 12px; color: #059669;">Downpayment:</td>
<td colspan="3" class="downpayment-label" style="font-size: 12px; color: #059669;">Downpayment:</td>
<td class="total-amount" style="font-size: 12px; color: #059669;">-$${amountPaid.toFixed(2)}</td>
</tr>
<tr class="footer-row">
@ -1490,13 +1490,13 @@ app.get('/api/quotes/:id/html', async (req, res) => {
itemsHTML += `
<tr class="footer-row">
<td colspan="3" class="total-label">Subtotal:</td>
<td colspan="3" class="subtotal-label">Subtotal:</td>
<td class="total-amount">$${parseFloat(quote.subtotal).toFixed(2)}</td>
</tr>`;
if (!quote.tax_exempt) {
itemsHTML += `
<tr class="footer-row">
<td colspan="3" class="total-label">Tax (${quote.tax_rate}%):</td>
<td colspan="3" class="tax-label">Tax (${quote.tax_rate}%):</td>
<td class="total-amount">$${parseFloat(quote.tax_amount).toFixed(2)}</td>
</tr>`;
}
@ -1595,13 +1595,13 @@ app.get('/api/invoices/:id/html', async (req, res) => {
itemsHTML += `
<tr class="footer-row">
<td colspan="3" class="total-label">Subtotal:</td>
<td colspan="3" class="subtotal-label">Subtotal:</td>
<td class="total-amount">$${parseFloat(invoice.subtotal).toFixed(2)}</td>
</tr>`;
if (!invoice.tax_exempt) {
itemsHTML += `
<tr class="footer-row">
<td colspan="3" class="total-label">Tax (${invoice.tax_rate}%):</td>
<td colspan="3" class="tax-label">Tax (${invoice.tax_rate}%):</td>
<td class="total-amount">$${parseFloat(invoice.tax_amount).toFixed(2)}</td>
</tr>`;
}
@ -1617,7 +1617,7 @@ app.get('/api/invoices/:id/html', async (req, res) => {
if (amountPaid > 0) {
itemsHTML += `
<tr class="footer-row">
<td colspan="3" class="total-label" style="font-size: 12px; color: #059669;">Downpayment:</td>
<td colspan="3" class="downpayment-label" style="font-size: 12px; color: #059669;">Downpayment:</td>
<td class="total-amount" style="font-size: 12px; color: #059669;">-$${amountPaid.toFixed(2)}</td>
</tr>
<tr class="footer-row">

View File

@ -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;

View File

@ -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;