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
|
// Copyright (c) 2016, Frappe and contributors
|
||||||
// For license information, please see license.txt
|
// For license information, please see license.txt
|
||||||
|
|
||||||
cur_frm.add_fetch('fee_structure', 'total_amount', 'amount');
|
|
||||||
|
|
||||||
frappe.ui.form.on("Program Enrollment", {
|
frappe.ui.form.on("Program Enrollment", {
|
||||||
|
setup: function(frm) {
|
||||||
|
frm.add_fetch('fee_structure', 'total_amount', 'amount');
|
||||||
|
},
|
||||||
|
|
||||||
onload: function(frm, cdt, cdn){
|
onload: function(frm, cdt, cdn){
|
||||||
frm.set_query("academic_term", "fees", function(){
|
frm.set_query("academic_term", "fees", function(){
|
||||||
return{
|
return{
|
||||||
|
@ -14,6 +14,8 @@ class ProgramEnrollment(Document):
|
|||||||
self.validate_duplication()
|
self.validate_duplication()
|
||||||
if not self.student_name:
|
if not self.student_name:
|
||||||
self.student_name = frappe.db.get_value("Student", self.student, "title")
|
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):
|
def on_submit(self):
|
||||||
self.update_student_joining_date()
|
self.update_student_joining_date()
|
||||||
|
Loading…
Reference in New Issue
Block a user