From 24be04427c9ce5b48afde2a9dde0c94a437892c9 Mon Sep 17 00:00:00 2001 From: vishal Date: Fri, 27 Oct 2023 11:22:55 +0530 Subject: [PATCH] fix: minor issue (cherry picked from commit b60c57a97dee1ab1a2b1654d4cc2d146e0141ff2) --- .../report/accounts_receivable/accounts_receivable.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/erpnext/accounts/report/accounts_receivable/accounts_receivable.py b/erpnext/accounts/report/accounts_receivable/accounts_receivable.py index a9b2fb2a47..da956aa384 100755 --- a/erpnext/accounts/report/accounts_receivable/accounts_receivable.py +++ b/erpnext/accounts/report/accounts_receivable/accounts_receivable.py @@ -841,7 +841,11 @@ class ReceivablePayableReport(object): if self.filters.get("customer_group"): groups = get_customer_group_with_children(self.filters.customer_group) - customers = qb.from_(self.customer).select(self.customer.name).where(self.customer['customer_group'].isin(groups)) + customers = ( + qb.from_(self.customer) + .select(self.customer.name) + .where(self.customer["customer_group"].isin(groups)) + ) self.qb_selection_filter.append(self.ple.party.isin(customers)) if self.filters.get("territory"): @@ -1135,6 +1139,7 @@ class ReceivablePayableReport(object): ) self.err_journals = [x[0] for x in results] if results else [] + def get_customer_group_with_children(customer_groups): if not isinstance(customer_groups, list): customer_groups = [d.strip() for d in customer_groups.strip().split(",") if d]