template change
This commit is contained in:
parent
8ce739d713
commit
5c86bd56aa
20
server.js
20
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="total-label">Subtotal:</td>
|
<td colspan="3" class="subtotal-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="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>
|
<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="total-label">Subtotal:</td>
|
<td colspan="3" class="subtotal-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="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>
|
<td class="total-amount">$${parseFloat(invoice.tax_amount).toFixed(2)}</td>
|
||||||
</tr>`;
|
</tr>`;
|
||||||
}
|
}
|
||||||
|
|
@ -1374,7 +1374,7 @@ app.get('/api/invoices/:id/pdf', async (req, res) => {
|
||||||
if (amountPaid > 0) {
|
if (amountPaid > 0) {
|
||||||
itemsHTML += `
|
itemsHTML += `
|
||||||
<tr class="footer-row">
|
<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>
|
<td class="total-amount" style="font-size: 12px; color: #059669;">-$${amountPaid.toFixed(2)}</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr class="footer-row">
|
<tr class="footer-row">
|
||||||
|
|
@ -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="total-label">Subtotal:</td>
|
<td colspan="3" class="subtotal-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="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>
|
<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="total-label">Subtotal:</td>
|
<td colspan="3" class="subtotal-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="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>
|
<td class="total-amount">$${parseFloat(invoice.tax_amount).toFixed(2)}</td>
|
||||||
</tr>`;
|
</tr>`;
|
||||||
}
|
}
|
||||||
|
|
@ -1617,7 +1617,7 @@ app.get('/api/invoices/:id/html', async (req, res) => {
|
||||||
if (amountPaid > 0) {
|
if (amountPaid > 0) {
|
||||||
itemsHTML += `
|
itemsHTML += `
|
||||||
<tr class="footer-row">
|
<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>
|
<td class="total-amount" style="font-size: 12px; color: #059669;">-$${amountPaid.toFixed(2)}</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr class="footer-row">
|
<tr class="footer-row">
|
||||||
|
|
|
||||||
|
|
@ -179,12 +179,29 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
.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;
|
||||||
padding-right: 20px !important;
|
padding-right: 20px !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
.total-amount {
|
.total-amount {
|
||||||
text-align: right;
|
text-align: right;
|
||||||
font-size: 14px;
|
font-size: 14px;
|
||||||
|
|
|
||||||
|
|
@ -175,6 +175,24 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
.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;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue