Merge pull request #13433 from manassolanki/fix-pe

minor fix for the program enrollment tool
This commit is contained in:
Manas Solanki 2018-03-29 16:37:54 +05:30 committed by GitHub
commit 618940b5c9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -26,7 +26,7 @@ class ProgramEnrollmentTool(Document):
elif self.get_students_from == "Program Enrollment":
condition2 = 'and student_batch_name=%(student_batch)s' if self.student_batch else " "
students = frappe.db.sql('''select student, student_name, student_batch_name from `tabProgram Enrollment`
where program=%(program)s and academic_year=%(academic_year)s {0} {1}'''
where program=%(program)s and academic_year=%(academic_year)s {0} {1} and docstatus != 2'''
.format(condition, condition2), self.as_dict(), as_dict=1)
student_list = [d.student for d in students]