Fix the demo for the schools (#8879)

* Fix the demo for the schools

* Fix for the demo

https://github.com/frappe/erpnext/issues/6347
This commit is contained in:
Manas Solanki
2017-06-01 18:30:35 +05:30
committed by Nabin Hait
parent fa16b849a0
commit f60bd60012
9 changed files with 172 additions and 113 deletions

View File

@@ -10,6 +10,14 @@ from frappe.model.mapper import get_mapped_doc
from frappe.utils import flt, cstr
from frappe.email.doctype.email_group.email_group import add_subscribers
def get_course(program):
'''Return list of courses for a particular program
:param program: Program
'''
courses = frappe.db.sql('''select course, course_name from `tabProgram Course` where parent=%s''',
(program), as_dict=1)
return courses
@frappe.whitelist()
def enroll_student(source_name):
"""Creates a Student Record and returns a Program Enrollment.