Merge pull request #14165 from codingCoffee/min
relieving_date wasnt of type datetime
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 6721749..d4e8ccd 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 @@
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))