[Fix] Cart remain same even if pos profile change (#12371)
This commit is contained in:
parent
bf4c114c58
commit
7fcc21bc8b
@ -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 [{
|
||||
|
Loading…
x
Reference in New Issue
Block a user