diff --git a/erpnext/payroll/doctype/salary_slip/test_salary_slip.py b/erpnext/payroll/doctype/salary_slip/test_salary_slip.py index 3052a2b727..6e8fae0c1a 100644 --- a/erpnext/payroll/doctype/salary_slip/test_salary_slip.py +++ b/erpnext/payroll/doctype/salary_slip/test_salary_slip.py @@ -171,6 +171,7 @@ class TestSalarySlip(unittest.TestCase): salary_slip.end_date = month_end_date salary_slip.save() salary_slip.submit() + salary_slip.reload() no_of_days = self.get_no_of_days() days_in_month = no_of_days[0] diff --git a/erpnext/projects/report/project_profitability/test_project_profitability.py b/erpnext/projects/report/project_profitability/test_project_profitability.py index 04156902f7..1eb3d0d717 100644 --- a/erpnext/projects/report/project_profitability/test_project_profitability.py +++ b/erpnext/projects/report/project_profitability/test_project_profitability.py @@ -25,6 +25,7 @@ class TestProjectProfitability(unittest.TestCase): self.timesheet = make_timesheet(emp, is_billable=1) self.salary_slip = make_salary_slip(self.timesheet.name) + self.salary_slip.start_date = self.timesheet.start_date holidays = self.salary_slip.get_holidays_for_employee(date, date) if holidays: @@ -41,8 +42,8 @@ class TestProjectProfitability(unittest.TestCase): def test_project_profitability(self): filters = { 'company': '_Test Company', - 'start_date': add_days(getdate(), -3), - 'end_date': getdate() + 'start_date': add_days(self.timesheet.start_date, -3), + 'end_date': self.timesheet.start_date } report = execute(filters)