update
This commit is contained in:
36
server.js
36
server.js
@@ -1230,13 +1230,13 @@ app.get('/api/quotes/:id/pdf', async (req, res) => {
|
|||||||
// Totals
|
// Totals
|
||||||
itemsHTML += `
|
itemsHTML += `
|
||||||
<tr class="footer-row">
|
<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>
|
<td class="total-amount">$${parseFloat(quote.subtotal).toFixed(2)}</td>
|
||||||
</tr>`;
|
</tr>`;
|
||||||
if (!quote.tax_exempt) {
|
if (!quote.tax_exempt) {
|
||||||
itemsHTML += `
|
itemsHTML += `
|
||||||
<tr class="footer-row">
|
<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>
|
<td class="total-amount">$${parseFloat(quote.tax_amount).toFixed(2)}</td>
|
||||||
</tr>`;
|
</tr>`;
|
||||||
}
|
}
|
||||||
@@ -1352,13 +1352,13 @@ app.get('/api/invoices/:id/pdf', async (req, res) => {
|
|||||||
|
|
||||||
itemsHTML += `
|
itemsHTML += `
|
||||||
<tr class="footer-row">
|
<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>
|
<td class="total-amount">$${parseFloat(invoice.subtotal).toFixed(2)}</td>
|
||||||
</tr>`;
|
</tr>`;
|
||||||
if (!invoice.tax_exempt) {
|
if (!invoice.tax_exempt) {
|
||||||
itemsHTML += `
|
itemsHTML += `
|
||||||
<tr class="footer-row">
|
<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>
|
<td class="total-amount">$${parseFloat(invoice.tax_amount).toFixed(2)}</td>
|
||||||
</tr>`;
|
</tr>`;
|
||||||
}
|
}
|
||||||
@@ -1367,19 +1367,19 @@ app.get('/api/invoices/:id/pdf', async (req, res) => {
|
|||||||
|
|
||||||
itemsHTML += `
|
itemsHTML += `
|
||||||
<tr class="footer-row">
|
<tr class="footer-row">
|
||||||
<td colspan="3" class="total-label">TOTAL:</td>
|
<td colspan="3" class="total-label" style="font-size: 14px;">TOTAL:</td>
|
||||||
<td class="total-amount">$${parseFloat(invoice.total).toFixed(2)}</td>
|
<td class="total-amount" style="font-size: 14px;">$${parseFloat(invoice.total).toFixed(2)}</td>
|
||||||
</tr>`;
|
</tr>`;
|
||||||
|
|
||||||
if (amountPaid > 0) {
|
if (amountPaid > 0) {
|
||||||
itemsHTML += `
|
itemsHTML += `
|
||||||
<tr class="footer-row">
|
<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>
|
<td class="total-amount" style="color: #059669;">-$${amountPaid.toFixed(2)}</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr class="footer-row">
|
<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 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: 14px; border-top: 2px solid #333; padding-top: 8px;">$${balanceDue.toFixed(2)}</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>`;
|
</tr>`;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1490,13 +1490,13 @@ app.get('/api/quotes/:id/html', async (req, res) => {
|
|||||||
|
|
||||||
itemsHTML += `
|
itemsHTML += `
|
||||||
<tr class="footer-row">
|
<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>
|
<td class="total-amount">$${parseFloat(quote.subtotal).toFixed(2)}</td>
|
||||||
</tr>`;
|
</tr>`;
|
||||||
if (!quote.tax_exempt) {
|
if (!quote.tax_exempt) {
|
||||||
itemsHTML += `
|
itemsHTML += `
|
||||||
<tr class="footer-row">
|
<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>
|
<td class="total-amount">$${parseFloat(quote.tax_amount).toFixed(2)}</td>
|
||||||
</tr>`;
|
</tr>`;
|
||||||
}
|
}
|
||||||
@@ -1595,13 +1595,13 @@ app.get('/api/invoices/:id/html', async (req, res) => {
|
|||||||
|
|
||||||
itemsHTML += `
|
itemsHTML += `
|
||||||
<tr class="footer-row">
|
<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>
|
<td class="total-amount">$${parseFloat(invoice.subtotal).toFixed(2)}</td>
|
||||||
</tr>`;
|
</tr>`;
|
||||||
if (!invoice.tax_exempt) {
|
if (!invoice.tax_exempt) {
|
||||||
itemsHTML += `
|
itemsHTML += `
|
||||||
<tr class="footer-row">
|
<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>
|
<td class="total-amount">$${parseFloat(invoice.tax_amount).toFixed(2)}</td>
|
||||||
</tr>`;
|
</tr>`;
|
||||||
}
|
}
|
||||||
@@ -1610,19 +1610,19 @@ app.get('/api/invoices/:id/html', async (req, res) => {
|
|||||||
|
|
||||||
itemsHTML += `
|
itemsHTML += `
|
||||||
<tr class="footer-row">
|
<tr class="footer-row">
|
||||||
<td colspan="3" class="total-label">TOTAL:</td>
|
<td colspan="3" class="total-label" style="font-size: 16px;">TOTAL:</td>
|
||||||
<td class="total-amount">$${parseFloat(invoice.total).toFixed(2)}</td>
|
<td class="total-amount" style="font-size: 16px;">$${parseFloat(invoice.total).toFixed(2)}</td>
|
||||||
</tr>`;
|
</tr>`;
|
||||||
|
|
||||||
if (amountPaid > 0) {
|
if (amountPaid > 0) {
|
||||||
itemsHTML += `
|
itemsHTML += `
|
||||||
<tr class="footer-row">
|
<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>
|
<td class="total-amount" style="color: #059669;">-$${amountPaid.toFixed(2)}</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr class="footer-row">
|
<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 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: 14px; border-top: 2px solid #333; padding-top: 8px;">$${balanceDue.toFixed(2)}</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>`;
|
</tr>`;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -179,24 +179,6 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.total-label {
|
.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;
|
text-align: right;
|
||||||
font-size: 14px;
|
font-size: 14px;
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
|
|||||||
@@ -175,24 +175,6 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.total-label {
|
.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;
|
text-align: right;
|
||||||
font-size: 14px;
|
font-size: 14px;
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
|
|||||||
Reference in New Issue
Block a user