fix: tds computation summary shows cancelled invoices (#26456)

This commit is contained in:
Saqib 2021-07-14 14:45:39 +05:30 committed by GitHub
parent c978fdf3df
commit 1c76154096
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -75,7 +75,8 @@ def get_invoice_and_tds_amount(supplier, account, company, from_date, to_date, f
select voucher_no, credit
from `tabGL Entry`
where party in (%s) and credit > 0
and company=%s and posting_date between %s and %s
and company=%s and is_cancelled = 0
and posting_date between %s and %s
""", (supplier, company, from_date, to_date), as_dict=1)
supplier_credit_amount = flt(sum(d.credit for d in entries))