From 09e077897bfbf2759aa783428f1c9a1e1ab91bfa Mon Sep 17 00:00:00 2001 From: Scott Pouliot Date: Fri, 15 May 2026 15:58:20 -0400 Subject: [PATCH] Fix quote preview not recalculating when tax-exempt customer is selected When a customer was changed to/from a tax-exempt customer, the hidden TaxPercent field was correctly updated to 0 but the live pricing preview was not re-run, so the display showed a stale total with tax applied. Selecting a tax-exempt customer now immediately triggers a recalc so the on-screen total matches the amount that will be saved. Co-Authored-By: Claude Sonnet 4.6 --- src/PowderCoating.Web/Views/Quotes/Create.cshtml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/PowderCoating.Web/Views/Quotes/Create.cshtml b/src/PowderCoating.Web/Views/Quotes/Create.cshtml index 011e52c..bfed60e 100644 --- a/src/PowderCoating.Web/Views/Quotes/Create.cshtml +++ b/src/PowderCoating.Web/Views/Quotes/Create.cshtml @@ -604,6 +604,8 @@ if (taxField) { taxField.value = exemptIds.has(customerId) ? 0 : (meta.companyTaxPercent ?? meta.taxPercent); } + // Recalculate the live preview so it reflects the updated tax rate immediately + if (typeof scheduleAutoPricing === 'function') scheduleAutoPricing(); const noEmail = customerId > 0 && noEmailIds.has(customerId); const emailSection = document.getElementById('emailNotifySection');