fix: pos, serial no popup comin two times (#22268)
This commit is contained in:
@@ -4,7 +4,6 @@
|
||||
erpnext.TransactionController = erpnext.taxes_and_totals.extend({
|
||||
setup: function() {
|
||||
this._super();
|
||||
frappe.flags.hide_serial_batch_dialog = true;
|
||||
frappe.ui.form.on(this.frm.doctype + " Item", "rate", function(frm, cdt, cdn) {
|
||||
var item = frappe.get_doc(cdt, cdn);
|
||||
var has_margin_field = frappe.meta.has_field(cdt, 'margin_type');
|
||||
@@ -539,7 +538,7 @@ erpnext.TransactionController = erpnext.taxes_and_totals.extend({
|
||||
if (show_batch_dialog)
|
||||
return frappe.db.get_value("Item", item.item_code, ["has_batch_no", "has_serial_no"])
|
||||
.then((r) => {
|
||||
if(r.message &&
|
||||
if(r.message && !frappe.flags.hide_serial_batch_dialog &&
|
||||
(r.message.has_batch_no || r.message.has_serial_no)) {
|
||||
frappe.flags.hide_serial_batch_dialog = false;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user