fix: allow statistical component in salary structure.

This commit is contained in:
Afshan 2021-01-20 13:58:32 +05:30
parent e2ed2324c3
commit 912647f4f2

View File

@ -216,8 +216,9 @@ def get_earning_deduction_components(doctype, txt, searchfield, start, page_len,
return frappe.db.sql("""
select t1.salary_component
from `tabSalary Component` t1, `tabSalary Component Account` t2
where t1.name = t2.parent
where (t1.name = t2.parent
and t1.type = %s
and t2.company = %s
and t2.company = %s)
or (t1.statistical_component = 1)
order by salary_component
""", (filters['type'], filters['company']) )
""", (filters['type'], filters['company']))