diff --git a/src/PowderCoating.Web/Views/Invoices/Create.cshtml b/src/PowderCoating.Web/Views/Invoices/Create.cshtml index 44e67e5..fbc8ccc 100644 --- a/src/PowderCoating.Web/Views/Invoices/Create.cshtml +++ b/src/PowderCoating.Web/Views/Invoices/Create.cshtml @@ -283,13 +283,13 @@ @@ -371,6 +371,10 @@ +
+ Discount Applied + −$0.00 +
@@ -725,13 +729,13 @@ @@ -797,6 +801,15 @@ const total = taxableAmount + tax; document.getElementById('displaySubtotal').textContent = formatCurrency(subtotal); + const discountRow = document.getElementById('discountRow'); + if (discountRow) { + if (discount > 0) { + document.getElementById('displayDiscount').textContent = '−' + formatCurrency(discount); + discountRow.classList.remove('d-none'); + } else { + discountRow.classList.add('d-none'); + } + } document.getElementById('displayTax').textContent = formatCurrency(tax); document.getElementById('displayTotal').textContent = formatCurrency(total); }