diff --git a/public/index.html b/public/index.html index 197f552..b052568 100644 --- a/public/index.html +++ b/public/index.html @@ -437,7 +437,10 @@ + Add Item -
+
+
diff --git a/src/services/pdf-service.js b/src/services/pdf-service.js index b04d086..ae23dd2 100644 --- a/src/services/pdf-service.js +++ b/src/services/pdf-service.js @@ -118,17 +118,26 @@ function renderInvoiceItems(items, invoice = null) { $${formatMoney(total)} `; + // Add downpayment/balance if partial // Add downpayment/balance if partial if (amountPaid > 0) { + const isFullyPaid = balanceDue <= 0.01; // allow for rounding + const paymentLabel = isFullyPaid ? 'Payment:' : 'Downpayment:'; + itemsHTML += ` - Downpayment: + ${paymentLabel} -$${formatMoney(amountPaid)} - + `; + + // Only show BALANCE DUE row if there's actually a remaining balance + if (!isFullyPaid) { + itemsHTML += ` BALANCE DUE: $${formatMoney(balanceDue)} `; + } } // Thank you message