diff --git a/server.js b/server.js
index aba5ec5..ec39006 100644
--- a/server.js
+++ b/server.js
@@ -330,7 +330,9 @@ async function syncInvoiceToQbo(invoiceId, client) {
return { success: true, sync_token: updated.SyncToken };
}
-
+function formatMoney(val) {
+ return parseFloat(val).toLocaleString('en-US', { minimumFractionDigits: 2, maximumFractionDigits: 2 });
+}
// =====================================================
// POST /api/invoices — Create + Auto QBO Export
// =====================================================
@@ -1231,19 +1233,19 @@ app.get('/api/quotes/:id/pdf', async (req, res) => {
itemsHTML += `
`;
if (!quote.tax_exempt) {
itemsHTML += `
`;
}
itemsHTML += `
`;
if (!invoice.tax_exempt) {
itemsHTML += `
`;
}
const amountPaid = parseFloat(invoice.amount_paid) || 0;
@@ -1367,19 +1369,19 @@ app.get('/api/invoices/:id/pdf', async (req, res) => {
itemsHTML += `
`;
if (amountPaid > 0) {
itemsHTML += `
`;
}
@@ -1491,19 +1493,19 @@ app.get('/api/quotes/:id/html', async (req, res) => {
itemsHTML += `
`;
if (!quote.tax_exempt) {
itemsHTML += `
`;
}
itemsHTML += `
`;
if (!invoice.tax_exempt) {
itemsHTML += `
`;
}
const amountPaid = parseFloat(invoice.amount_paid) || 0;
@@ -1611,18 +1613,18 @@ app.get('/api/invoices/:id/html', async (req, res) => {
itemsHTML += `
`;
if (amountPaid > 0) {
itemsHTML += `
`;
}