diff --git a/erpnext/public/js/controllers/transaction.js b/erpnext/public/js/controllers/transaction.js index 7ab8533368f..5fa63cb9c02 100644 --- a/erpnext/public/js/controllers/transaction.js +++ b/erpnext/public/js/controllers/transaction.js @@ -2203,6 +2203,7 @@ erpnext.TransactionController = class TransactionController extends erpnext.taxe 'item_code': item.item_code, 'valid_from': ["<=", doc.transaction_date || doc.bill_date || doc.posting_date], 'item_group': item.item_group, + 'disabled': 0, } if (doc.tax_category) diff --git a/erpnext/stock/get_item_details.py b/erpnext/stock/get_item_details.py index bdc442e07a1..bd263c6c6a1 100644 --- a/erpnext/stock/get_item_details.py +++ b/erpnext/stock/get_item_details.py @@ -635,8 +635,10 @@ def _get_item_tax_template(args, taxes, out=None, for_validate=False): taxes_with_no_validity = [] for tax in taxes: - tax_company = frappe.get_cached_value("Item Tax Template", tax.item_tax_template, "company") - if tax_company == args["company"]: + disabled, tax_company = frappe.get_cached_value( + "Item Tax Template", tax.item_tax_template, ["disabled", "company"] + ) + if not disabled and tax_company == args["company"]: if tax.valid_from or tax.maximum_net_rate: # In purchase Invoice first preference will be given to supplier invoice date # if supplier date is not present then posting date