fix: set empty value for tax template in item details (#37496)
* fix: empty tax template for items with invalid templates
* fix: test for empty tax template
* fix: test for item tax template calculation
* fix: test for pos inv tax template calculation
diff --git a/erpnext/stock/get_item_details.py b/erpnext/stock/get_item_details.py
index 5954462..8c6fd84 100644
--- a/erpnext/stock/get_item_details.py
+++ b/erpnext/stock/get_item_details.py
@@ -606,6 +606,7 @@
# all templates have validity and no template is valid
if not taxes_with_validity and (not taxes_with_no_validity):
+ out["item_tax_template"] = ""
return None
# do not change if already a valid template