fix: Create POS Opening Entry POS Profile filter.

pos_profile_query was variable instead of function.

(cherry picked from commit 1328a45f2a)
This commit is contained in:
Maharshi Patel
2022-11-04 15:29:17 +05:30
committed by Mergify
parent 3bd024ca8f
commit 60af9c0516

View File

@@ -67,7 +67,7 @@ erpnext.PointOfSale.Controller = class {
{ {
fieldtype: 'Link', label: __('POS Profile'), fieldtype: 'Link', label: __('POS Profile'),
options: 'POS Profile', fieldname: 'pos_profile', reqd: 1, options: 'POS Profile', fieldname: 'pos_profile', reqd: 1,
get_query: () => pos_profile_query, get_query: () => pos_profile_query(),
onchange: () => fetch_pos_payment_methods() onchange: () => fetch_pos_payment_methods()
}, },
{ {
@@ -101,9 +101,11 @@ erpnext.PointOfSale.Controller = class {
primary_action_label: __('Submit') primary_action_label: __('Submit')
}); });
dialog.show(); dialog.show();
const pos_profile_query = { const pos_profile_query = () => {
query: 'erpnext.accounts.doctype.pos_profile.pos_profile.pos_profile_query', return {
filters: { company: dialog.fields_dict.company.get_value() } query: 'erpnext.accounts.doctype.pos_profile.pos_profile.pos_profile_query',
filters: { company: dialog.fields_dict.company.get_value() }
}
}; };
} }