Merge pull request #32175 from SolufyPrivateLimited/filter_AR

fix: Set filter condition and spell in AR
This commit is contained in:
ruthra kumar 2022-09-12 15:00:36 +05:30 committed by GitHub
commit ce0676ac70
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -784,7 +784,7 @@ class ReceivablePayableReport(object):
def add_customer_filters( def add_customer_filters(
self, self,
): ):
self.customter = qb.DocType("Customer") self.customer = qb.DocType("Customer")
if self.filters.get("customer_group"): if self.filters.get("customer_group"):
self.get_hierarchical_filters("Customer Group", "customer_group") self.get_hierarchical_filters("Customer Group", "customer_group")
@ -838,7 +838,7 @@ class ReceivablePayableReport(object):
customer = self.customer customer = self.customer
groups = qb.from_(doc).select(doc.name).where((doc.lft >= lft) & (doc.rgt <= rgt)) groups = qb.from_(doc).select(doc.name).where((doc.lft >= lft) & (doc.rgt <= rgt))
customers = qb.from_(customer).select(customer.name).where(customer[key].isin(groups)) customers = qb.from_(customer).select(customer.name).where(customer[key].isin(groups))
self.qb_selection_filter.append(ple.isin(ple.party.isin(customers))) self.qb_selection_filter.append(ple.party.isin(customers))
def add_accounting_dimensions_filters(self): def add_accounting_dimensions_filters(self):
accounting_dimensions = get_accounting_dimensions(as_list=False) accounting_dimensions = get_accounting_dimensions(as_list=False)