From b3f81ad5b08039eae9f9733fb36d3074730f8ec1 Mon Sep 17 00:00:00 2001 From: Rucha Mahabal Date: Fri, 23 Oct 2020 21:21:58 +0530 Subject: [PATCH] fix: allow future attendance marking for leave applications --- .../education/doctype/student_attendance/student_attendance.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/education/doctype/student_attendance/student_attendance.py b/erpnext/education/doctype/student_attendance/student_attendance.py index 572fd10802..595dff9b9d 100644 --- a/erpnext/education/doctype/student_attendance/student_attendance.py +++ b/erpnext/education/doctype/student_attendance/student_attendance.py @@ -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: