fix: Get basic and hra component from db, not from cache

(cherry picked from commit 10df3d5081)
This commit is contained in:
Nabin Hait
2020-05-14 17:15:16 +05:30
committed by mergify-bot
parent dc59831aa9
commit 52890341d5

View File

@@ -236,8 +236,7 @@ def get_tax_template_for_sez(party_details, master_doctype, company, party_type)
def calculate_annual_eligible_hra_exemption(doc):
basic_component = frappe.get_cached_value('Company', doc.company, "basic_component")
hra_component = frappe.get_cached_value('Company', doc.company, "hra_component")
basic_component, hra_component = frappe.db.get_value('Company', doc.company, ["basic_component", "hra_component"])
if not (basic_component and hra_component):
frappe.throw(_("Please mention Basic and HRA component in Company"))
annual_exemption, monthly_exemption, hra_amount = 0, 0, 0