Fixes for attendance reports
This commit is contained in:
parent
5079c9ef47
commit
7a61f12572
@ -49,7 +49,7 @@ def get_columns(filters):
|
||||
|
||||
def get_absent_students(date):
|
||||
absent_students = frappe.db.sql("""select student, student_name, student_batch from `tabStudent Attendance`
|
||||
where docstatus = 1 and status="Absent" and date = %s order by student_batch, student_name""", date, as_dict=1)
|
||||
where status="Absent" and date = %s order by student_batch, student_name""", date, as_dict=1)
|
||||
return absent_students
|
||||
|
||||
def get_leave_applications(date):
|
||||
|
@ -58,7 +58,7 @@ def get_student_batch_strength(student_batch):
|
||||
|
||||
def get_student_attendance(student_batch, date):
|
||||
student_attendance = frappe.db.sql("""select count(*) as count, status from `tabStudent Attendance` where \
|
||||
student_batch= %s and date= %s and docstatus=1 and\
|
||||
student_batch= %s and date= %s and\
|
||||
(course_schedule is Null or course_schedule='') group by status""",
|
||||
(student_batch, date), as_dict=1)
|
||||
return student_attendance
|
@ -53,7 +53,7 @@ def get_students_list(students):
|
||||
|
||||
def get_attendance_list(from_date, to_date, student_batch, students_list):
|
||||
attendance_list = frappe.db.sql("""select student, date, status
|
||||
from `tabStudent Attendance` where docstatus = 1 and student_batch = %s
|
||||
from `tabStudent Attendance` where student_batch = %s
|
||||
and date between %s and %s
|
||||
order by student, date""",
|
||||
(student_batch, from_date, to_date), as_dict=1)
|
||||
|
Loading…
Reference in New Issue
Block a user