Skip to content

Commit

Permalink
fix: customer group test case failure
Browse files Browse the repository at this point in the history
  • Loading branch information
RitvikSardana committed Aug 31, 2023
1 parent 5443a7b commit a2b44e5
Showing 1 changed file with 10 additions and 5 deletions.
15 changes: 10 additions & 5 deletions erpnext/accounts/report/accounts_receivable/accounts_receivable.py
Original file line number Diff line number Diff line change
Expand Up @@ -764,12 +764,17 @@ def prepare_conditions(self):
self.qb_selection_filter = []
self.or_filters = []

self.add_common_filters(party_type_field=self.filters.party_type)
if self.filters.party_type == "Customer":
self.add_customer_filters()
for party_type in self.party_type:
party_type_field = scrub(party_type)
self.or_filters.append(self.ple.party_type == party_type)

self.add_common_filters(party_type_field=party_type_field)

if party_type_field == "customer":
self.add_customer_filters()

elif self.filters.party_type == "Supplier":
self.add_supplier_filters()
elif party_type_field == "supplier":
self.add_supplier_filters()

if self.filters.cost_center:
self.get_cost_center_conditions()
Expand Down

0 comments on commit a2b44e5

Please sign in to comment.