diff --git a/erpnext/schools/report/absent_student_report/absent_student_report.py b/erpnext/schools/report/absent_student_report/absent_student_report.py index 11b2e13807..ba2b7add75 100644 --- a/erpnext/schools/report/absent_student_report/absent_student_report.py +++ b/erpnext/schools/report/absent_student_report/absent_student_report.py @@ -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): diff --git a/erpnext/schools/report/student_batch_wise_attendance/student_batch_wise_attendance.py b/erpnext/schools/report/student_batch_wise_attendance/student_batch_wise_attendance.py index b6bedcb022..d8df3a02ad 100644 --- a/erpnext/schools/report/student_batch_wise_attendance/student_batch_wise_attendance.py +++ b/erpnext/schools/report/student_batch_wise_attendance/student_batch_wise_attendance.py @@ -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 \ No newline at end of file diff --git a/erpnext/schools/report/student_monthly_attendance_sheet/student_monthly_attendance_sheet.py b/erpnext/schools/report/student_monthly_attendance_sheet/student_monthly_attendance_sheet.py index 01cee58350..f906034948 100644 --- a/erpnext/schools/report/student_monthly_attendance_sheet/student_monthly_attendance_sheet.py +++ b/erpnext/schools/report/student_monthly_attendance_sheet/student_monthly_attendance_sheet.py @@ -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)