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

This commit is contained in:
Nabin Hait 2020-05-14 17:15:16 +05:30
parent 12a9328a63
commit 10df3d5081

View File

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