From e8ea6022f02615dccb0766b52b9a0c36a3b2d067 Mon Sep 17 00:00:00 2001 From: ruthra kumar Date: Thu, 30 Nov 2023 12:22:55 +0530 Subject: [PATCH] refactor: pass on filter to upfront outstanding query as well (cherry picked from commit cfd3230c75b5e549b98b2362947ee8744c98e920) --- erpnext/accounts/utils.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/erpnext/accounts/utils.py b/erpnext/accounts/utils.py index 2836056b0c9a..c98b8193538a 100644 --- a/erpnext/accounts/utils.py +++ b/erpnext/accounts/utils.py @@ -1809,6 +1809,8 @@ def query_for_outstanding(self): .where(ple.delinked == 0) .where(Criterion.all(filter_on_against_voucher_no)) .where(Criterion.all(self.common_filter)) + .where(Criterion.all(self.dimensions_filter)) + .where(Criterion.all(self.voucher_posting_date)) .groupby(ple.against_voucher_type, ple.against_voucher_no, ple.party_type, ple.party) .orderby(ple.posting_date, ple.voucher_no) .having(qb.Field("amount_in_account_currency") > 0)