fix: get_outstanding_invoices not ignoring the cancelled transactions

Added is_cancelled=0 in 2 places for get_outstanding_invoices
This commit is contained in:
aakvatech 2020-10-03 19:41:38 +03:00 committed by GitHub
parent 3c77a4697b
commit 38ccf82604
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -683,6 +683,7 @@ def get_outstanding_invoices(party_type, party, account, condition=None, filters
where
party_type = %(party_type)s and party = %(party)s
and account = %(account)s and {dr_or_cr} > 0
and is_cancelled=0
{condition}
and ((voucher_type = 'Journal Entry'
and (against_voucher = '' or against_voucher is null))
@ -705,6 +706,7 @@ def get_outstanding_invoices(party_type, party, account, condition=None, filters
and account = %(account)s
and {payment_dr_or_cr} > 0
and against_voucher is not null and against_voucher != ''
and is_cancelled=0
group by against_voucher_type, against_voucher
""".format(payment_dr_or_cr=payment_dr_or_cr), {
"party_type": party_type,