Merge pull request #14165 from codingCoffee/min

relieving_date wasnt of type datetime
This commit is contained in:
Faris Ansari 2018-05-21 16:42:41 +05:30 committed by GitHub
commit e479057148
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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))