From 26928b395bc25f2733ecdc49ce21939cf9d172de Mon Sep 17 00:00:00 2001 From: "mergify[bot]" <37929162+mergify[bot]@users.noreply.github.com> Date: Sun, 14 May 2023 11:54:15 +0530 Subject: [PATCH] fix: function `batch_no` should only be declared once (#35115) fix: function `batch_no` should only be declared once (#35115) fix: remove twice event call of `batch_no` to update batch qty (cherry picked from commit 19cd68778485525bcfcbc0105c4c2591e9aabff1) Co-authored-by: Daizy Modi --- 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 f1df3a11de48..e3de49c57d81 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);