add courses in the program enrollment (#11694)
This commit is contained in:
parent
ed4191ec5b
commit
30babee2ef
@ -1,9 +1,12 @@
|
||||
// Copyright (c) 2016, Frappe and contributors
|
||||
// For license information, please see license.txt
|
||||
|
||||
cur_frm.add_fetch('fee_structure', 'total_amount', 'amount');
|
||||
|
||||
frappe.ui.form.on("Program Enrollment", {
|
||||
setup: function(frm) {
|
||||
frm.add_fetch('fee_structure', 'total_amount', 'amount');
|
||||
},
|
||||
|
||||
onload: function(frm, cdt, cdn){
|
||||
frm.set_query("academic_term", "fees", function(){
|
||||
return{
|
||||
|
@ -14,6 +14,8 @@ class ProgramEnrollment(Document):
|
||||
self.validate_duplication()
|
||||
if not self.student_name:
|
||||
self.student_name = frappe.db.get_value("Student", self.student, "title")
|
||||
if not self.courses:
|
||||
self.extend("courses", self.get_courses())
|
||||
|
||||
def on_submit(self):
|
||||
self.update_student_joining_date()
|
||||
|
Loading…
Reference in New Issue
Block a user