fix: Added validation for student DOB can not be greater than Joining Date
This commit is contained in:
parent
c2c12dc82f
commit
e329d417d6
@ -25,6 +25,9 @@ class Student(Document):
|
|||||||
if self.date_of_birth and getdate(self.date_of_birth) >= getdate(today()):
|
if self.date_of_birth and getdate(self.date_of_birth) >= getdate(today()):
|
||||||
frappe.throw(_("Date of Birth cannot be greater than today."))
|
frappe.throw(_("Date of Birth cannot be greater than today."))
|
||||||
|
|
||||||
|
if self.date_of_birth and getdate(self.date_of_birth) >= getdate(self.joining_date):
|
||||||
|
frappe.throw(_("Date of Birth cannot be greater than Joining Date."))
|
||||||
|
|
||||||
if self.joining_date and self.date_of_leaving and getdate(self.joining_date) > getdate(self.date_of_leaving):
|
if self.joining_date and self.date_of_leaving and getdate(self.joining_date) > getdate(self.date_of_leaving):
|
||||||
frappe.throw(_("Joining Date can not be greater than Leaving Date"))
|
frappe.throw(_("Joining Date can not be greater than Leaving Date"))
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user