mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-21 22:19:18 +00:00
* fix(test): create salary slip as per timesheet dates for Project Profitability
* fix(test): reload salary slip before checking for payment days
(cherry picked from commit 88df5ce530)
Co-authored-by: Rucha Mahabal <ruchamahabal2@gmail.com>
This commit is contained in:
@@ -26,6 +26,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:
|
||||
@@ -42,8 +43,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)
|
||||
|
||||
Reference in New Issue
Block a user