[Fix] Cart remain same even if pos profile change (#12371)

This commit is contained in:
rohitwaghchaure 2018-01-08 15:22:22 +05:30 committed by Nabin Hait
parent bf4c114c58
commit 7fcc21bc8b

View File

@ -320,7 +320,7 @@ erpnext.pos.PointOfSale = class PointOfSale {
return new Promise((resolve) => {
const on_submit = ({ pos_profile, set_as_default }) => {
if (pos_profile) {
this.frm.doc.pos_profile = pos_profile;
this.pos_profile = pos_profile;
}
if (set_as_default) {
@ -346,6 +346,10 @@ erpnext.pos.PointOfSale = class PointOfSale {
}
on_change_pos_profile() {
return frappe.run_serially([
() => this.make_sales_invoice_frm(),
() => {
this.frm.doc.pos_profile = this.pos_profile;
this.set_pos_profile_data()
.then(() => {
this.reset_cart();
@ -354,6 +358,8 @@ erpnext.pos.PointOfSale = class PointOfSale {
}
});
}
]);
}
get_promopt_fields() {
return [{