fix: POS qty decrement freezing the screen
This commit is contained in:
parent
48bca9fbf2
commit
e994494e3e
@ -233,13 +233,16 @@ erpnext.pos.PointOfSale = class PointOfSale {
|
|||||||
} else {
|
} else {
|
||||||
this.update_item_in_frm(item, field, value)
|
this.update_item_in_frm(item, field, value)
|
||||||
.then(() => {
|
.then(() => {
|
||||||
|
frappe.dom.unfreeze();
|
||||||
|
let items = this.frm.doc.items.map(item => item.idx);
|
||||||
|
if (items && items.length > 0 && items.indexOf(item.idx)) {
|
||||||
this.frm.doc.items.forEach(item_row => {
|
this.frm.doc.items.forEach(item_row => {
|
||||||
// update cart
|
// update cart
|
||||||
frappe.run_serially([
|
this.on_qty_change(item_row);
|
||||||
() => this.update_cart_data(item_row),
|
|
||||||
() => this.set_form_action()
|
|
||||||
]);
|
|
||||||
});
|
});
|
||||||
|
} else {
|
||||||
|
this.on_qty_change(item);
|
||||||
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
@ -280,6 +283,13 @@ erpnext.pos.PointOfSale = class PointOfSale {
|
|||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
on_qty_change(item) {
|
||||||
|
frappe.run_serially([
|
||||||
|
() => this.update_cart_data(item),
|
||||||
|
() => this.set_form_action()
|
||||||
|
]);
|
||||||
|
}
|
||||||
|
|
||||||
select_batch_and_serial_no(row) {
|
select_batch_and_serial_no(row) {
|
||||||
frappe.dom.unfreeze();
|
frappe.dom.unfreeze();
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user