Skip to content

Commit

Permalink
Merge pull request #38447 from frappe/mergify/bp/version-14-hotfix/pr…
Browse files Browse the repository at this point in the history
…-38446

refactor: pass on filter to up front outstanding query as well (backport #38446)
  • Loading branch information
ruthra-kumar authored Nov 30, 2023
2 parents 2908d96 + e8ea602 commit d82a123
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions erpnext/accounts/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit d82a123

Please sign in to comment.