Merge pull request #29094 from frappe/mergify/bp/develop/pr-29092
fix(India): Tax and Charges template not getting fetched based on tax category assigned (backport #29092)
diff --git a/erpnext/accounts/doctype/purchase_invoice/test_purchase_invoice.py b/erpnext/accounts/doctype/purchase_invoice/test_purchase_invoice.py
index cb18dd3..21846bb 100644
--- a/erpnext/accounts/doctype/purchase_invoice/test_purchase_invoice.py
+++ b/erpnext/accounts/doctype/purchase_invoice/test_purchase_invoice.py
@@ -1236,7 +1236,7 @@
def update_tax_witholding_category(company, account):
from erpnext.accounts.utils import get_fiscal_year
- fiscal_year = get_fiscal_year(fiscal_year='2021')
+ fiscal_year = get_fiscal_year(date=nowdate())
if not frappe.db.get_value('Tax Withholding Rate',
{'parent': 'TDS - 194 - Dividends - Individual', 'from_date': ('>=', fiscal_year[1]),
diff --git a/erpnext/regional/india/utils.py b/erpnext/regional/india/utils.py
index 215b483..d443f9c 100644
--- a/erpnext/regional/india/utils.py
+++ b/erpnext/regional/india/utils.py
@@ -215,7 +215,7 @@
if tax_template_by_category:
party_details['taxes_and_charges'] = tax_template_by_category
- return
+ return party_details
if not party_details.place_of_supply: return party_details
if not party_details.company_gstin: return party_details