mirror of
https://github.com/frappe/erpnext.git
synced 2026-06-07 07:02:54 +00:00
Update attendance.py
This commit is contained in:
@@ -37,7 +37,7 @@ class Attendance(Document):
|
|||||||
def validate_attendance_date(self):
|
def validate_attendance_date(self):
|
||||||
if getdate(self.attendance_date) > getdate(nowdate()):
|
if getdate(self.attendance_date) > getdate(nowdate()):
|
||||||
frappe.throw(_("Attendance can not be marked for future dates"))
|
frappe.throw(_("Attendance can not be marked for future dates"))
|
||||||
elif getdate(self.att_date) < frappe.db.get_value("Employee", self.employee, "date_of_joining"):
|
elif getdate(self.attendance_date) < frappe.db.get_value("Employee", self.employee, "date_of_joining"):
|
||||||
frappe.throw(_("Attendance date can not be less than employee's joining date"))
|
frappe.throw(_("Attendance date can not be less than employee's joining date"))
|
||||||
|
|
||||||
def validate_employee(self):
|
def validate_employee(self):
|
||||||
|
|||||||
Reference in New Issue
Block a user