From 323e46ba5a206e5be85f200a04174d44f8b858a4 Mon Sep 17 00:00:00 2001 From: KanchanChauhan Date: Wed, 10 May 2017 17:46:32 +0530 Subject: [PATCH] Added parent filter to the Salary Structure Employee since it was getting base and variable value from first found Salary Structure Employee (#8756) --- erpnext/hr/doctype/salary_slip/salary_slip.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/erpnext/hr/doctype/salary_slip/salary_slip.py b/erpnext/hr/doctype/salary_slip/salary_slip.py index e42295810d4..c7bbe65a47a 100644 --- a/erpnext/hr/doctype/salary_slip/salary_slip.py +++ b/erpnext/hr/doctype/salary_slip/salary_slip.py @@ -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())