fix: ignore cancelled payments in Sales/Purchase Register
(cherry picked from commit 0f1be03faf96aaf83063e28dc57a5e016944683c)
This commit is contained in:
parent
18575e137c
commit
9e1b443857
@ -251,6 +251,7 @@ def get_journal_entries(filters, args):
|
|||||||
)
|
)
|
||||||
.where(
|
.where(
|
||||||
(je.voucher_type == "Journal Entry")
|
(je.voucher_type == "Journal Entry")
|
||||||
|
& (je.docstatus == 1)
|
||||||
& (journal_account.party == filters.get(args.party))
|
& (journal_account.party == filters.get(args.party))
|
||||||
& (journal_account.account.isin(args.party_account))
|
& (journal_account.account.isin(args.party_account))
|
||||||
)
|
)
|
||||||
@ -281,7 +282,9 @@ def get_payment_entries(filters, args):
|
|||||||
pe.cost_center,
|
pe.cost_center,
|
||||||
)
|
)
|
||||||
.where(
|
.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)
|
.orderby(pe.posting_date, pe.name, order=Order.desc)
|
||||||
)
|
)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user