From 1328a45f2a244b9fabc4fbc61fa2d073032035c5 Mon Sep 17 00:00:00 2001 From: Maharshi Patel Date: Fri, 4 Nov 2022 15:29:17 +0530 Subject: [PATCH] fix: Create POS Opening Entry POS Profile filter. pos_profile_query was variable instead of function. --- erpnext/selling/page/point_of_sale/pos_controller.js | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/erpnext/selling/page/point_of_sale/pos_controller.js b/erpnext/selling/page/point_of_sale/pos_controller.js index 24375d8252..595b9196e8 100644 --- a/erpnext/selling/page/point_of_sale/pos_controller.js +++ b/erpnext/selling/page/point_of_sale/pos_controller.js @@ -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() }, { @@ -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() } + } }; }