diff --git a/hrms/payroll/doctype/salary_slip/salary_slip.py b/hrms/payroll/doctype/salary_slip/salary_slip.py index 5f2787fded..c623a708ce 100644 --- a/hrms/payroll/doctype/salary_slip/salary_slip.py +++ b/hrms/payroll/doctype/salary_slip/salary_slip.py @@ -329,7 +329,7 @@ def get_emp_and_working_day_details(self): struct = self.check_sal_struct() if struct: - self._salary_structure_doc = frappe.get_cached_doc("Salary Structure", struct) + self.set_salary_structure_doc() self.salary_slip_based_on_timesheet = ( self._salary_structure_doc.salary_slip_based_on_timesheet or 0 ) diff --git a/hrms/payroll/doctype/salary_slip/test_salary_slip.py b/hrms/payroll/doctype/salary_slip/test_salary_slip.py index 0305859d18..e24d5002cf 100644 --- a/hrms/payroll/doctype/salary_slip/test_salary_slip.py +++ b/hrms/payroll/doctype/salary_slip/test_salary_slip.py @@ -1884,7 +1884,8 @@ def make_earning_salary_component( "salary_component": "Special Allowance", "abbr": "SA", "condition": "H < 10000", - "formula": "BS*.5", + # intentional to test multiline formula + "formula": "BS\n*.5", "type": "Earning", "amount_based_on_formula": 1, "depends_on_payment_days": 0,