fix: joining and relieving Date can be on same date as valid use case on emoloyee form (#19798)

* fix: date validation on inpatient record, else condition removing on clinical prcd templ which is not req

* fix:Pricing Rule error AttributeError: 'str' object has no attribute 'get' #19770

* fix:Pricing Rule error AttributeError: 'str' object has no attribute 'get' #19770

* fix: joining and relieving Date can be on same date as valid use case

* Update employee.py
This commit is contained in:
Khushal Trivedi 2019-12-04 11:56:44 +05:30 committed by Nabin Hait
parent dfd82d22c8
commit 51f2131a41

View File

@ -152,8 +152,8 @@ class Employee(NestedSet):
elif self.date_of_retirement and self.date_of_joining and (getdate(self.date_of_retirement) <= getdate(self.date_of_joining)): elif self.date_of_retirement and self.date_of_joining and (getdate(self.date_of_retirement) <= getdate(self.date_of_joining)):
throw(_("Date Of Retirement must be greater than Date of Joining")) throw(_("Date Of Retirement must be greater than Date of Joining"))
elif self.relieving_date and self.date_of_joining and (getdate(self.relieving_date) <= getdate(self.date_of_joining)): elif self.relieving_date and self.date_of_joining and (getdate(self.relieving_date) < getdate(self.date_of_joining)):
throw(_("Relieving Date must be greater than Date of Joining")) throw(_("Relieving Date must be greater than or equal to Date of Joining"))
elif self.contract_end_date and self.date_of_joining and (getdate(self.contract_end_date) <= getdate(self.date_of_joining)): elif self.contract_end_date and self.date_of_joining and (getdate(self.contract_end_date) <= getdate(self.date_of_joining)):
throw(_("Contract End Date must be greater than Date of Joining")) throw(_("Contract End Date must be greater than Date of Joining"))