mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-16 03:29:16 +00:00
fix: pos item cart dom updates (#26461)
This commit is contained in:
@@ -965,8 +965,23 @@ erpnext.PointOfSale.ItemCart = class {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
attach_refresh_field_event(frm) {
|
||||||
|
$(frm.wrapper).off('refresh-fields');
|
||||||
|
$(frm.wrapper).on('refresh-fields', () => {
|
||||||
|
if (frm.doc.items.length) {
|
||||||
|
frm.doc.items.forEach(item => {
|
||||||
|
this.update_item_html(item);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
this.update_totals_section(frm);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
load_invoice() {
|
load_invoice() {
|
||||||
const frm = this.events.get_frm();
|
const frm = this.events.get_frm();
|
||||||
|
|
||||||
|
this.attach_refresh_field_event(frm);
|
||||||
|
|
||||||
this.fetch_customer_details(frm.doc.customer).then(() => {
|
this.fetch_customer_details(frm.doc.customer).then(() => {
|
||||||
this.events.customer_details_updated(this.customer_info);
|
this.events.customer_details_updated(this.customer_info);
|
||||||
this.update_customer_section();
|
this.update_customer_section();
|
||||||
|
|||||||
Reference in New Issue
Block a user