def make_fee_records(self): from erpnext.education.api import get_fee_components fee_list = [] for d in self.fees: fee_components = get_fee_components(d.fee_structure) if fee_components: fees = frappe.new_doc("Fees") fees.update({ "student": self.student, "academic_year": self.academic_year, "academic_term": d.academic_term, "fee_structure": d.fee_structure, "program": self.program, "due_date": d.due_date, "student_name": self.student_name, "program_enrollment": self.name, "components": fee_components }) fees.save() fees.submit() fee_list.append(fees.name) if fee_list: fee_list = ["""<a href="#Form/Fees/%s" target="_blank">%s</a>""" % \ (fee, fee) for fee in fee_list] msgprint( _("Fee Records Created - {0}").format(comma_and(fee_list)))
def make_fee_records(self): from erpnext.education.api import get_fee_components fee_list = [] for d in self.fees: fee_components = get_fee_components(d.fee_structure) if fee_components: fees = frappe.new_doc("Fees") fees.update({ "student": self.student, "academic_year": self.academic_year, "academic_term": d.academic_term, "fee_structure": d.fee_structure, "program": self.program, "due_date": d.due_date, "student_name": self.student_name, "program_enrollment": self.name, "components": fee_components }) fees.save() fees.submit() fee_list.append(fees.name) if fee_list: fee_list = ["""<a href="#Form/Fees/%s" target="_blank">%s</a>""" % \ (fee, fee) for fee in fee_list] msgprint(_("Fee Records Created - {0}").format(comma_and(fee_list)))