From 0e50e77d8ebaeb22b23c681c2cc5e4cb18535a47 Mon Sep 17 00:00:00 2001 From: Gursheen Anand Date: Tue, 21 Nov 2023 15:14:55 +0530 Subject: [PATCH] fix: unset discount amount based on coupon code (cherry picked from commit 6518582ed3be49dd3bc6a62745dae3e6faed2658) --- erpnext/public/js/utils/sales_common.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/erpnext/public/js/utils/sales_common.js b/erpnext/public/js/utils/sales_common.js index 1d6daa554bdb..5514963c966c 100644 --- a/erpnext/public/js/utils/sales_common.js +++ b/erpnext/public/js/utils/sales_common.js @@ -369,6 +369,11 @@ erpnext.sales_common = { } } } + + coupon_code() { + this.frm.set_value("discount_amount", 0); + this.frm.set_value("additional_discount_percentage", 0); + } }; } }