fix!: remove barcode field triggers

use "scan barcode" field instead for scanning

[skip ci]
This commit is contained in:
Ankush Menat 2022-03-31 14:38:00 +05:30 committed by Ankush Menat
parent 530f767098
commit 9bf427985f
3 changed files with 1 additions and 41 deletions

View File

@ -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);

View File

@ -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){

View File

@ -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];