mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-21 22:19:18 +00:00
fix: allow future attendance marking for leave applications
This commit is contained in:
@@ -28,7 +28,7 @@ class StudentAttendance(Document):
|
|||||||
frappe.bold('Course Schedule')), title=_('Mandatory Fields'))
|
frappe.bold('Course Schedule')), title=_('Mandatory Fields'))
|
||||||
|
|
||||||
def validate_date(self):
|
def validate_date(self):
|
||||||
if getdate(self.date) > getdate():
|
if not self.leave_application and getdate(self.date) > getdate():
|
||||||
frappe.throw(_('Attendance cannot be marked for future dates.'))
|
frappe.throw(_('Attendance cannot be marked for future dates.'))
|
||||||
|
|
||||||
if self.student_group:
|
if self.student_group:
|
||||||
|
|||||||
Reference in New Issue
Block a user