feat(Education): Student Attendance and Leave Enhancements (#22623)

* feat: make Student Attendance doctype submittable

* feat: add attendance related fields in Student Leave Application

* feat: update Attendance records on Leave Application submission

* refactor: better error messages and ORM queries

* fix: show present only for leave applications with mark_as_present enabled in attendance reports

* test: Student Leave Application

* fix: filter for attendance records

* fix: codacy issues
This commit is contained in:
Rucha Mahabal
2020-07-23 16:40:07 +05:30
committed by GitHub
parent 04a76285e2
commit 833682b03d
12 changed files with 468 additions and 698 deletions

View File

@@ -104,6 +104,7 @@ def make_attendance_records(student, student_name, status, course_schedule=None,
student_attendance.date = date
student_attendance.status = status
student_attendance.save()
student_attendance.submit()
@frappe.whitelist()
@@ -363,9 +364,9 @@ def get_current_enrollment(student, academic_year=None):
select
name as program_enrollment, student_name, program, student_batch_name as student_batch,
student_category, academic_term, academic_year
from
from
`tabProgram Enrollment`
where
where
student = %s and academic_year = %s
order by creation''', (student, current_academic_year), as_dict=1)