Skip to content

Commit

Permalink
Merge pull request #39125 from ruthra-kumar/ignore_cancelled_payment_…
Browse files Browse the repository at this point in the history
…in_sales_register

fix: ignore cancelled payments in Sales/Purchase Register
  • Loading branch information
deepeshgarg007 authored Jan 4, 2024
2 parents df409d8 + 0f1be03 commit e2cf1ea
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 e2cf1ea

Please sign in to comment.