Skip to content

Commit

Permalink
Merge pull request #31727 from frappe/mergify/bp/version-13-hotfix/pr…
Browse files Browse the repository at this point in the history
…-31656

fix: use current pos profile on sales return (backport #31656)
  • Loading branch information
deepeshgarg007 authored Jul 28, 2022
2 parents f57d2fa + c442b4a commit 25da4d2
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion erpnext/selling/page/point_of_sale/pos_controller.js
Original file line number Diff line number Diff line change
Expand Up @@ -497,7 +497,10 @@ erpnext.PointOfSale.Controller = class {

set_pos_profile_data() {
if (this.company && !this.frm.doc.company) this.frm.doc.company = this.company;
if (this.pos_profile && !this.frm.doc.pos_profile) this.frm.doc.pos_profile = this.pos_profile;
if ((this.pos_profile && !this.frm.doc.pos_profile) | (this.frm.doc.is_return && this.pos_profile != this.frm.doc.pos_profile)) {
this.frm.doc.pos_profile = this.pos_profile;
}

if (!this.frm.doc.company) return;

return this.frm.trigger("set_pos_data");
Expand Down

0 comments on commit 25da4d2

Please sign in to comment.