mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-26 16:34:46 +00:00
fix: online pos print not working
This commit is contained in:
@@ -449,8 +449,7 @@ erpnext.pos.PointOfSale = class PointOfSale {
|
|||||||
|
|
||||||
$(this.frm.msgbox.body).find('.btn-primary').on('click', () => {
|
$(this.frm.msgbox.body).find('.btn-primary').on('click', () => {
|
||||||
this.frm.msgbox.hide();
|
this.frm.msgbox.hide();
|
||||||
const frm = this.events.get_frm();
|
const frm = this.frm;
|
||||||
frm.doc = this.doc;
|
|
||||||
frm.print_preview.lang_code = frm.doc.language;
|
frm.print_preview.lang_code = frm.doc.language;
|
||||||
frm.print_preview.printit(true);
|
frm.print_preview.printit(true);
|
||||||
});
|
});
|
||||||
@@ -688,8 +687,8 @@ erpnext.pos.PointOfSale = class PointOfSale {
|
|||||||
if(this.frm.doc.docstatus != 1 ){
|
if(this.frm.doc.docstatus != 1 ){
|
||||||
await this.frm.save();
|
await this.frm.save();
|
||||||
}
|
}
|
||||||
const frm = this.events.get_frm();
|
|
||||||
frm.doc = this.doc;
|
const frm = this.frm;
|
||||||
frm.print_preview.lang_code = frm.doc.language;
|
frm.print_preview.lang_code = frm.doc.language;
|
||||||
frm.print_preview.printit(true);
|
frm.print_preview.printit(true);
|
||||||
});
|
});
|
||||||
@@ -948,8 +947,12 @@ class POSCart {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
onchange: () => {
|
onchange: () => {
|
||||||
this.events.on_customer_change(this.customer_field.get_value());
|
let customer = this.customer_field.get_value();
|
||||||
this.events.get_loyalty_details();
|
frappe.db.get_value("Customer", customer, "language", (r) => {
|
||||||
|
this.frm.doc.language = r ? r.language : "en-US";
|
||||||
|
this.events.on_customer_change(customer);
|
||||||
|
this.events.get_loyalty_details();
|
||||||
|
});
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
parent: this.wrapper.find('.customer-field'),
|
parent: this.wrapper.find('.customer-field'),
|
||||||
|
|||||||
Reference in New Issue
Block a user