From 6518582ed3be49dd3bc6a62745dae3e6faed2658 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 --- 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); + } }; } }