fix: leave application and timesheet tests

This commit is contained in:
Sagar Vora 2019-01-02 21:28:11 +05:30
parent 9c69e40970
commit c14c7c84e3
2 changed files with 3 additions and 1 deletions

View File

@ -457,7 +457,7 @@ def get_leave_period():
return frappe.get_doc(dict(
name = 'Test Leave Period',
doctype = 'Leave Period',
from_date = "{0}-01-01".format(now_datetime().year),
from_date = "{0}-12-01".format(now_datetime().year - 1),
to_date = "{0}-12-31".format(now_datetime().year),
company = "_Test Company",
is_active = 1

View File

@ -186,6 +186,8 @@ def make_salary_structure_for_timesheet(employee):
if not frappe.db.get_value("Salary Structure Assignment",
{'employee':employee, 'docstatus': 1}):
frappe.db.set_value('Employee', employee, 'date_of_joining',
add_months(nowdate(), -5))
create_salary_structure_assignment(employee, salary_structure.name)
return salary_structure