From 35984daf7265f8dc74e6c772a28a8e4219b9cfd6 Mon Sep 17 00:00:00 2001 From: Ameya Shenoy Date: Mon, 21 May 2018 16:37:27 +0530 Subject: [PATCH] relieving_date wasnt of type datetime --- .../salary_structure_assignment/salary_structure_assignment.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/hr/doctype/salary_structure_assignment/salary_structure_assignment.py b/erpnext/hr/doctype/salary_structure_assignment/salary_structure_assignment.py index 67217490e1..d4e8ccdf11 100644 --- a/erpnext/hr/doctype/salary_structure_assignment/salary_structure_assignment.py +++ b/erpnext/hr/doctype/salary_structure_assignment/salary_structure_assignment.py @@ -31,7 +31,7 @@ class SalaryStructureAssignment(Document): if self.from_date and getdate(self.from_date) > getdate(self.to_date): frappe.throw(_("From Date {0} cannot be after To Date {1}") .format(self.from_date, self.to_date)) - if relieving_date and getdate(self.to_date) > relieving_date and not self.flags.old_employee: + if relieving_date and getdate(self.to_date) > getdate(relieving_date) and not self.flags.old_employee: frappe.throw(_("To Date {0} cannot be after employee's relieving Date {1}") .format(self.to_date, relieving_date))