Skip to content

Commit

Permalink
fix: ignore cancelled payments in Sales/Purchase Register
Browse files Browse the repository at this point in the history
(cherry picked from commit 0f1be03)
  • Loading branch information
ruthra-kumar authored and mergify[bot] committed Jan 4, 2024
1 parent 18575e1 commit 9e1b443
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion erpnext/accounts/report/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -251,6 +251,7 @@ def get_journal_entries(filters, args):
)
.where(
(je.voucher_type == "Journal Entry")
& (je.docstatus == 1)
& (journal_account.party == filters.get(args.party))
& (journal_account.account.isin(args.party_account))
)
Expand Down Expand Up @@ -281,7 +282,9 @@ def get_payment_entries(filters, args):
pe.cost_center,
)
.where(
(pe.party == filters.get(args.party)) & (pe[args.account_fieldname].isin(args.party_account))
(pe.docstatus == 1)
& (pe.party == filters.get(args.party))
& (pe[args.account_fieldname].isin(args.party_account))
)
.orderby(pe.posting_date, pe.name, order=Order.desc)
)
Expand Down

0 comments on commit 9e1b443

Please sign in to comment.