refactor: pass on filter to upfront outstanding query as well

(cherry picked from commit cfd3230c75)
This commit is contained in:
ruthra kumar
2023-11-30 12:22:55 +05:30
committed by Mergify
parent 2908d966b6
commit e8ea6022f0

View File

@@ -1809,6 +1809,8 @@ class QueryPaymentLedger(object):
.where(ple.delinked == 0) .where(ple.delinked == 0)
.where(Criterion.all(filter_on_against_voucher_no)) .where(Criterion.all(filter_on_against_voucher_no))
.where(Criterion.all(self.common_filter)) .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) .groupby(ple.against_voucher_type, ple.against_voucher_no, ple.party_type, ple.party)
.orderby(ple.posting_date, ple.voucher_no) .orderby(ple.posting_date, ple.voucher_no)
.having(qb.Field("amount_in_account_currency") > 0) .having(qb.Field("amount_in_account_currency") > 0)