From db9a319104f2b1988a99e6f45bf555e1dcd79ca1 Mon Sep 17 00:00:00 2001 From: Smit Vora Date: Fri, 20 Dec 2024 11:02:33 +0530 Subject: [PATCH] fix: typerror on TDS payable monthly report (backport #37707) --- .../report/tax_withholding_details/tax_withholding_details.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/accounts/report/tax_withholding_details/tax_withholding_details.py b/erpnext/accounts/report/tax_withholding_details/tax_withholding_details.py index b969627fdd6..d6e0af0b5da 100644 --- a/erpnext/accounts/report/tax_withholding_details/tax_withholding_details.py +++ b/erpnext/accounts/report/tax_withholding_details/tax_withholding_details.py @@ -70,7 +70,7 @@ def get_result(filters, tds_docs, tds_accounts, tax_category_map, journal_entry_ rate = tax_rate_map.get(tax_withholding_category) if net_total_map.get((voucher_type, name)): - if voucher_type == "Journal Entry": + if voucher_type == "Journal Entry" and tax_amount and rate: # back calcalute total amount from rate and tax_amount base_total = min(tax_amount / (rate / 100), net_total_map.get((voucher_type, name))[0]) total_amount = grand_total = base_total