From a60ab1af75eae9869656eef6673bfd26b7f89661 Mon Sep 17 00:00:00 2001 From: rohitwaghchaure Date: Thu, 20 Sep 2018 13:18:49 +0530 Subject: [PATCH] [Fix] Salary slip is not saving (#15449) --- 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 5f195d925c3..3ee98e6be03 100644 --- a/erpnext/hr/doctype/salary_slip/salary_slip.py +++ b/erpnext/hr/doctype/salary_slip/salary_slip.py @@ -181,7 +181,8 @@ class SalarySlip(TransactionBase): if len(st_name) > 1: frappe.msgprint(_("Multiple active Salary Structures found for employee {0} for the given dates") .format(self.employee), title=_('Warning')) - return st_name and st_name[0][0] or '' + self.salary_structure = st_name and st_name[0][0] or '' + return self.salary_structure else: self.salary_structure = None frappe.msgprint(_("No active or default Salary Structure found for employee {0} for the given dates")