fix: Remove callback outside if condition

This commit is contained in:
marination 2020-04-26 17:16:21 +05:30
parent e1e98fe116
commit de33029393

View File

@ -312,10 +312,9 @@ frappe.ui.form.on('Stock Entry', {
callback: function(r) {
if (!r.exe && r.message){
frappe.model.set_value(cdt, cdn, "serial_no", r.message);
if (callback) {
callback();
}
}
if (callback) {
callback();
}
}
});
@ -540,8 +539,9 @@ frappe.ui.form.on('Stock Entry', {
frappe.ui.form.on('Stock Entry Detail', {
qty: function(frm, cdt, cdn) {
frm.events.set_basic_rate(frm, cdt, cdn);
frm.events.set_serial_no(frm, cdt, cdn);
frm.events.set_serial_no(frm, cdt, cdn, () => {
frm.events.set_basic_rate(frm, cdt, cdn);
});
},
conversion_factor: function(frm, cdt, cdn) {