Fixes for attendance reports

This commit is contained in:
Manas Solanki 2017-02-22 16:07:18 +05:30 committed by Nabin Hait
parent 5079c9ef47
commit 7a61f12572
3 changed files with 3 additions and 3 deletions

View File

@ -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):

View File

@ -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

View File

@ -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)