Merge pull request #38448 from frappe/mergify/bp/version-15-hotfix/pr-38446

refactor: pass on filter to up front outstanding query as well (backport #38446)
This commit is contained in:
ruthra kumar 2023-11-30 13:18:52 +05:30 committed by GitHub
commit 05da5bfc9a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1839,6 +1839,8 @@ class QueryPaymentLedger(object):
.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)