Merge branch 'staging-fixes' into patch-to-rename-additional-salary-component
diff --git a/erpnext/hr/doctype/leave_application/test_leave_application.py b/erpnext/hr/doctype/leave_application/test_leave_application.py
index 4748011..a682e8b 100644
--- a/erpnext/hr/doctype/leave_application/test_leave_application.py
+++ b/erpnext/hr/doctype/leave_application/test_leave_application.py
@@ -457,7 +457,7 @@
 		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
diff --git a/erpnext/projects/doctype/timesheet/test_timesheet.py b/erpnext/projects/doctype/timesheet/test_timesheet.py
index 8c84c11..f117903 100644
--- a/erpnext/projects/doctype/timesheet/test_timesheet.py
+++ b/erpnext/projects/doctype/timesheet/test_timesheet.py
@@ -186,6 +186,8 @@
 
 	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