From 19cd68778485525bcfcbc0105c4c2591e9aabff1 Mon Sep 17 00:00:00 2001 From: Daizy Modi Date: Sun, 14 May 2023 08:56:25 +0530 Subject: [PATCH] fix: function `batch_no` should only be declared once (#35115) fix: remove twice event call of `batch_no` to update batch qty --- erpnext/selling/sales_common.js | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/erpnext/selling/sales_common.js b/erpnext/selling/sales_common.js index f1df3a11de..e3de49c57d 100644 --- a/erpnext/selling/sales_common.js +++ b/erpnext/selling/sales_common.js @@ -299,7 +299,8 @@ erpnext.selling.SellingController = class SellingController extends erpnext.Tran } batch_no(doc, cdt, cdn) { - var me = this; + super.batch_no(doc, cdt, cdn); + var item = frappe.get_doc(cdt, cdn); if (item.serial_no) { @@ -378,10 +379,6 @@ erpnext.selling.SellingController = class SellingController extends erpnext.Tran } } - batch_no(doc, cdt, cdn) { - super.batch_no(doc, cdt, cdn); - } - qty(doc, cdt, cdn) { super.qty(doc, cdt, cdn);