fix: allow future attendance marking for leave applications

This commit is contained in:
Rucha Mahabal 2020-10-23 21:21:58 +05:30
parent b01334d2e1
commit b3f81ad5b0

View File

@ -28,7 +28,7 @@ class StudentAttendance(Document):
frappe.bold('Course Schedule')), title=_('Mandatory Fields'))
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.'))
if self.student_group: