update
This commit is contained in:
parent
10380f26c4
commit
66736ef09d
36
server.js
36
server.js
|
|
@ -1230,13 +1230,13 @@ app.get('/api/quotes/:id/pdf', async (req, res) => {
|
|||
// Totals
|
||||
itemsHTML += `
|
||||
<tr class="footer-row">
|
||||
<td colspan="3" class="subtotal-label">Subtotal:</td>
|
||||
<td colspan="3" class="total-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="tax-label">Tax (${quote.tax_rate}%):</td>
|
||||
<td colspan="3" class="total-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="subtotal-label">Subtotal:</td>
|
||||
<td colspan="3" class="total-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="tax-label">Tax (${invoice.tax_rate}%):</td>
|
||||
<td colspan="3" class="total-label">Tax (${invoice.tax_rate}%):</td>
|
||||
<td class="total-amount">$${parseFloat(invoice.tax_amount).toFixed(2)}</td>
|
||||
</tr>`;
|
||||
}
|
||||
|
|
@ -1367,19 +1367,19 @@ app.get('/api/invoices/:id/pdf', async (req, res) => {
|
|||
|
||||
itemsHTML += `
|
||||
<tr class="footer-row">
|
||||
<td colspan="3" class="total-label">TOTAL:</td>
|
||||
<td class="total-amount">$${parseFloat(invoice.total).toFixed(2)}</td>
|
||||
<td colspan="3" class="total-label" style="font-size: 14px;">TOTAL:</td>
|
||||
<td class="total-amount" style="font-size: 14px;">$${parseFloat(invoice.total).toFixed(2)}</td>
|
||||
</tr>`;
|
||||
|
||||
if (amountPaid > 0) {
|
||||
itemsHTML += `
|
||||
<tr class="footer-row">
|
||||
<td colspan="3" class="downpayment-label" style="font-size: 12px; color: #059669;">Downpayment:</td>
|
||||
<td colspan="3" class="total-label" style="font-size: 14px; color: #059669;">Downpayment:</td>
|
||||
<td class="total-amount" style="color: #059669;">-$${amountPaid.toFixed(2)}</td>
|
||||
</tr>
|
||||
<tr class="footer-row">
|
||||
<td colspan="3" class="total-label" style="font-weight: bold; font-size: 14px; border-top: 2px solid #333; padding-top: 8px;">BALANCE DUE:</td>
|
||||
<td class="total-amount" style="font-weight: bold; font-size: 14px; border-top: 2px solid #333; padding-top: 8px;">$${balanceDue.toFixed(2)}</td>
|
||||
<td colspan="3" class="total-label" style="font-weight: bold; font-size: 16px; border-top: 2px solid #333; padding-top: 8px;">BALANCE DUE:</td>
|
||||
<td class="total-amount" style="font-weight: bold; font-size: 16px; border-top: 2px solid #333; padding-top: 8px;">$${balanceDue.toFixed(2)}</td>
|
||||
</tr>`;
|
||||
}
|
||||
|
||||
|
|
@ -1490,13 +1490,13 @@ app.get('/api/quotes/:id/html', async (req, res) => {
|
|||
|
||||
itemsHTML += `
|
||||
<tr class="footer-row">
|
||||
<td colspan="3" class="subtotal-label">Subtotal:</td>
|
||||
<td colspan="3" class="total-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="tax-label">Tax (${quote.tax_rate}%):</td>
|
||||
<td colspan="3" class="total-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="subtotal-label">Subtotal:</td>
|
||||
<td colspan="3" class="total-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="tax-label">Tax (${invoice.tax_rate}%):</td>
|
||||
<td colspan="3" class="total-label">Tax (${invoice.tax_rate}%):</td>
|
||||
<td class="total-amount">$${parseFloat(invoice.tax_amount).toFixed(2)}</td>
|
||||
</tr>`;
|
||||
}
|
||||
|
|
@ -1610,19 +1610,19 @@ app.get('/api/invoices/:id/html', async (req, res) => {
|
|||
|
||||
itemsHTML += `
|
||||
<tr class="footer-row">
|
||||
<td colspan="3" class="total-label">TOTAL:</td>
|
||||
<td class="total-amount">$${parseFloat(invoice.total).toFixed(2)}</td>
|
||||
<td colspan="3" class="total-label" style="font-size: 16px;">TOTAL:</td>
|
||||
<td class="total-amount" style="font-size: 16px;">$${parseFloat(invoice.total).toFixed(2)}</td>
|
||||
</tr>`;
|
||||
|
||||
if (amountPaid > 0) {
|
||||
itemsHTML += `
|
||||
<tr class="footer-row">
|
||||
<td colspan="3" class="downpayment-label" style="font-size: 12px; color: #059669;">Downpayment:</td>
|
||||
<td colspan="3" class="total-label" style="color: #059669;">Downpayment:</td>
|
||||
<td class="total-amount" style="color: #059669;">-$${amountPaid.toFixed(2)}</td>
|
||||
</tr>
|
||||
<tr class="footer-row">
|
||||
<td colspan="3" class="total-label" style="font-weight: bold; font-size: 14px; border-top: 2px solid #333; padding-top: 8px;">BALANCE DUE:</td>
|
||||
<td class="total-amount" style="font-weight: bold; font-size: 14px; border-top: 2px solid #333; padding-top: 8px;">$${balanceDue.toFixed(2)}</td>
|
||||
<td colspan="3" class="total-label" style="font-weight: bold; font-size: 16px; border-top: 2px solid #333; padding-top: 8px;">BALANCE DUE:</td>
|
||||
<td class="total-amount" style="font-weight: bold; font-size: 16px; border-top: 2px solid #333; padding-top: 8px;">$${balanceDue.toFixed(2)}</td>
|
||||
</tr>`;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -179,24 +179,6 @@
|
|||
}
|
||||
|
||||
.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;
|
||||
|
|
|
|||
|
|
@ -175,24 +175,6 @@
|
|||
}
|
||||
|
||||
.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;
|
||||
|
|
|
|||
Loading…
Reference in New Issue