Skip to content

Commit

Permalink
fix: Create POS Opening Entry POS Profile filter.
Browse files Browse the repository at this point in the history
pos_profile_query was variable instead of function.

(cherry picked from commit 1328a45)
  • Loading branch information
maharshivpatel authored and mergify[bot] committed Nov 5, 2022
1 parent c1bc104 commit 76e4bb4
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions erpnext/selling/page/point_of_sale/pos_controller.js
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ erpnext.PointOfSale.Controller = class {
{
fieldtype: 'Link', label: __('POS Profile'),
options: 'POS Profile', fieldname: 'pos_profile', reqd: 1,
get_query: () => pos_profile_query,
get_query: () => pos_profile_query(),
onchange: () => fetch_pos_payment_methods()
},
{
Expand Down Expand Up @@ -101,9 +101,11 @@ erpnext.PointOfSale.Controller = class {
primary_action_label: __('Submit')
});
dialog.show();
const pos_profile_query = {
query: 'erpnext.accounts.doctype.pos_profile.pos_profile.pos_profile_query',
filters: { company: dialog.fields_dict.company.get_value() }
const pos_profile_query = () => {
return {
query: 'erpnext.accounts.doctype.pos_profile.pos_profile.pos_profile_query',
filters: { company: dialog.fields_dict.company.get_value() }
}
};
}

Expand Down

0 comments on commit 76e4bb4

Please sign in to comment.