frappe / erpnext

Free and Open Source Enterprise Resource Planning (ERP)
https://erpnext.com
GNU General Public License v3.0
17.69k stars 6.75k forks source link

fix: Cancelled enrollments are being picked up #24028

Open aakvatech opened 3 years ago

aakvatech commented 3 years ago

https://github.com/frappe/erpnext/blob/5c04b2eea4607fc6a4341f4a35a79e63f6ea1b8d/erpnext/education/doctype/student_group/student_group.py#L103

In the student group under the section of student, when you click on the button get student, the system is fetching the name of all students who are enrolled in that particular batch where the student group is linked to. The problem is it is fetching the name of the student even if the enrollment is CANCELLED. If you cancel an enrollment and amend then the system is fetching the same student twice because it finds 2 enrollments, Once cancelled and one amended. SYSTEM SHOULD IGNORE THE CANCELLED ENROLLMENTS

Expected behaviour: Cancelled enrollemnts should not be picked up Actual behaviour: Cancelled enrollements are being picked up.

aakvatech commented 3 years ago

It's a matter to filter docstatus=1