diff --git a/erpnext/public/js/controllers/transaction.js b/erpnext/public/js/controllers/transaction.js index 6196392516..f948c60010 100644 --- a/erpnext/public/js/controllers/transaction.js +++ b/erpnext/public/js/controllers/transaction.js @@ -403,15 +403,6 @@ erpnext.TransactionController = class TransactionController extends erpnext.taxe var sms_man = new erpnext.SMSManager(this.frm.doc); } - barcode(doc, cdt, cdn) { - var d = locals[cdt][cdn]; - if(d.barcode=="" || d.barcode==null) { - // barcode cleared, remove item - d.item_code = ""; - } - this.item_code(doc, cdt, cdn); - } - item_code(doc, cdt, cdn) { var me = this; var item = frappe.get_doc(cdt, cdn); diff --git a/erpnext/stock/doctype/stock_entry/stock_entry.js b/erpnext/stock/doctype/stock_entry/stock_entry.js index 1aafcee5bf..7564bb266d 100644 --- a/erpnext/stock/doctype/stock_entry/stock_entry.js +++ b/erpnext/stock/doctype/stock_entry/stock_entry.js @@ -646,21 +646,6 @@ frappe.ui.form.on('Stock Entry Detail', { frm.events.calculate_basic_amount(frm, item); }, - barcode: function(doc, cdt, cdn) { - var d = locals[cdt][cdn]; - if (d.barcode) { - frappe.call({ - method: "erpnext.stock.get_item_details.get_item_code", - args: {"barcode": d.barcode }, - callback: function(r) { - if (!r.exe){ - frappe.model.set_value(cdt, cdn, "item_code", r.message); - } - } - }); - } - }, - uom: function(doc, cdt, cdn) { var d = locals[cdt][cdn]; if(d.uom && d.item_code){ diff --git a/erpnext/stock/doctype/stock_reconciliation/stock_reconciliation.js b/erpnext/stock/doctype/stock_reconciliation/stock_reconciliation.js index 84f65a077e..4438acf811 100644 --- a/erpnext/stock/doctype/stock_reconciliation/stock_reconciliation.js +++ b/erpnext/stock/doctype/stock_reconciliation/stock_reconciliation.js @@ -163,20 +163,7 @@ frappe.ui.form.on("Stock Reconciliation", { }); } }, - set_item_code: function(doc, cdt, cdn) { - var d = frappe.model.get_doc(cdt, cdn); - if (d.barcode) { - frappe.call({ - method: "erpnext.stock.get_item_details.get_item_code", - args: {"barcode": d.barcode }, - callback: function(r) { - if (!r.exe){ - frappe.model.set_value(cdt, cdn, "item_code", r.message); - } - } - }); - } - }, + set_amount_quantity: function(doc, cdt, cdn) { var d = frappe.model.get_doc(cdt, cdn); if (d.qty & d.valuation_rate) { @@ -214,9 +201,6 @@ frappe.ui.form.on("Stock Reconciliation", { }); frappe.ui.form.on("Stock Reconciliation Item", { - barcode: function(frm, cdt, cdn) { - frm.events.set_item_code(frm, cdt, cdn); - }, warehouse: function(frm, cdt, cdn) { var child = locals[cdt][cdn];