Added parent filter to the Salary Structure Employee since it was getting base and variable value from first found Salary Structure Employee (#8756)

This commit is contained in:
KanchanChauhan 2017-05-10 17:46:32 +05:30 committed by Nabin Hait
parent 62414565b1
commit 323e46ba5a

View File

@ -99,7 +99,8 @@ class SalarySlip(TransactionBase):
'''Returns data for evaluating formula'''
data = frappe._dict()
data.update(frappe.get_doc("Salary Structure Employee", {"employee": self.employee}).as_dict())
data.update(frappe.get_doc("Salary Structure Employee",
{"employee": self.employee, "parent": self.salary_structure}).as_dict())
data.update(frappe.get_doc("Employee", self.employee).as_dict())
data.update(self.as_dict())