mirror of
https://github.com/frappe/erpnext.git
synced 2026-06-01 19:29:10 +00:00
fix(item_tax_template): fetch parent account if not set (#20197)
This commit is contained in:
@@ -98,6 +98,9 @@ def get_item_tax_template(item_tax_templates, item_tax_map, item_code, parenttyp
|
|||||||
company = get_company(parts[-1], parenttype, parent)
|
company = get_company(parts[-1], parenttype, parent)
|
||||||
parent_account = frappe.db.get_value("Account",
|
parent_account = frappe.db.get_value("Account",
|
||||||
filters={"account_type": "Tax", "root_type": "Liability", "is_group": 0, "company": company}, fieldname="parent_account")
|
filters={"account_type": "Tax", "root_type": "Liability", "is_group": 0, "company": company}, fieldname="parent_account")
|
||||||
|
if not parent_account:
|
||||||
|
parent_account = frappe.db.get_value("Account",
|
||||||
|
filters={"account_type": "Tax", "root_type": "Liability", "is_group": 1, "company": company})
|
||||||
filters = {
|
filters = {
|
||||||
"account_name": account_name,
|
"account_name": account_name,
|
||||||
"company": company,
|
"company": company,
|
||||||
|
|||||||
Reference in New Issue
Block a user