fix!: remove barcode field triggers
use "scan barcode" field instead for scanning [skip ci]
This commit is contained in:
parent
530f767098
commit
9bf427985f
@ -403,15 +403,6 @@ erpnext.TransactionController = class TransactionController extends erpnext.taxe
|
|||||||
var sms_man = new erpnext.SMSManager(this.frm.doc);
|
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) {
|
item_code(doc, cdt, cdn) {
|
||||||
var me = this;
|
var me = this;
|
||||||
var item = frappe.get_doc(cdt, cdn);
|
var item = frappe.get_doc(cdt, cdn);
|
||||||
|
@ -646,21 +646,6 @@ frappe.ui.form.on('Stock Entry Detail', {
|
|||||||
frm.events.calculate_basic_amount(frm, item);
|
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) {
|
uom: function(doc, cdt, cdn) {
|
||||||
var d = locals[cdt][cdn];
|
var d = locals[cdt][cdn];
|
||||||
if(d.uom && d.item_code){
|
if(d.uom && d.item_code){
|
||||||
|
@ -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) {
|
set_amount_quantity: function(doc, cdt, cdn) {
|
||||||
var d = frappe.model.get_doc(cdt, cdn);
|
var d = frappe.model.get_doc(cdt, cdn);
|
||||||
if (d.qty & d.valuation_rate) {
|
if (d.qty & d.valuation_rate) {
|
||||||
@ -214,9 +201,6 @@ frappe.ui.form.on("Stock Reconciliation", {
|
|||||||
});
|
});
|
||||||
|
|
||||||
frappe.ui.form.on("Stock Reconciliation Item", {
|
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) {
|
warehouse: function(frm, cdt, cdn) {
|
||||||
var child = locals[cdt][cdn];
|
var child = locals[cdt][cdn];
|
||||||
|
Loading…
Reference in New Issue
Block a user