fix: Do not consider opening entries for TDS calculation (#23597)

This commit is contained in:
Deepesh Garg 2020-10-12 12:39:08 +05:30 committed by GitHub
parent c9ebef4d30
commit 15d46040ff
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -106,6 +106,7 @@ def get_tds_amount(suppliers, net_total, company, tax_details, fiscal_year_detai
from `tabGL Entry` from `tabGL Entry`
where company = %s and where company = %s and
party in %s and fiscal_year=%s and credit > 0 party in %s and fiscal_year=%s and credit > 0
and is_opening = 'No'
""", (company, tuple(suppliers), fiscal_year), as_dict=1) """, (company, tuple(suppliers), fiscal_year), as_dict=1)
vouchers = [d.voucher_no for d in entries] vouchers = [d.voucher_no for d in entries]
@ -192,6 +193,7 @@ def get_advance_vouchers(suppliers, fiscal_year=None, company=None, from_date=No
select distinct voucher_no select distinct voucher_no
from `tabGL Entry` from `tabGL Entry`
where party in %s and %s and debit > 0 where party in %s and %s and debit > 0
and is_opening = 'No'
""", (tuple(suppliers), condition)) or [] """, (tuple(suppliers), condition)) or []
def get_debit_note_amount(suppliers, year_start_date, year_end_date, company=None): def get_debit_note_amount(suppliers, year_start_date, year_end_date, company=None):