From a9ea49c9767c50bd5c69d6fbc8a04a47a3bc12bc Mon Sep 17 00:00:00 2001 From: deepeshgarg007 Date: Thu, 4 Jul 2019 15:56:34 +0530 Subject: [PATCH] fix: Additonal discount not get set in sales transactions --- erpnext/selling/sales_common.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/erpnext/selling/sales_common.js b/erpnext/selling/sales_common.js index 9bae58b309..ad3f27c9c1 100644 --- a/erpnext/selling/sales_common.js +++ b/erpnext/selling/sales_common.js @@ -145,6 +145,11 @@ erpnext.selling.SellingController = erpnext.TransactionController.extend({ }, discount_amount: function(doc, cdt, cdn) { + + if(doc.name === cdn) { + return; + } + var item = frappe.get_doc(cdt, cdn); item.discount_percentage = 0.0; this.apply_discount_on_item(doc, cdt, cdn, 'discount_amount');