From 89f93461858dc7203f4de11f166b80800be830e2 Mon Sep 17 00:00:00 2001 From: Rucha Mahabal Date: Thu, 23 Jul 2020 20:59:56 +0530 Subject: [PATCH] fix(Education): descriptions not copied while creating fees from fee structure (#22792) Co-authored-by: Deepesh Garg <42651287+deepeshgarg007@users.noreply.github.com> --- erpnext/education/api.py | 2 +- erpnext/education/doctype/fees/fees.js | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/erpnext/education/api.py b/erpnext/education/api.py index fe033d4fc5..bf9f2215f3 100644 --- a/erpnext/education/api.py +++ b/erpnext/education/api.py @@ -152,7 +152,7 @@ def get_fee_components(fee_structure): :param fee_structure: Fee Structure. """ if fee_structure: - fs = frappe.get_list("Fee Component", fields=["fees_category", "amount"] , filters={"parent": fee_structure}, order_by= "idx") + fs = frappe.get_list("Fee Component", fields=["fees_category", "description", "amount"] , filters={"parent": fee_structure}, order_by= "idx") return fs diff --git a/erpnext/education/doctype/fees/fees.js b/erpnext/education/doctype/fees/fees.js index 867866fbf1..aaf42b4751 100644 --- a/erpnext/education/doctype/fees/fees.js +++ b/erpnext/education/doctype/fees/fees.js @@ -162,6 +162,7 @@ frappe.ui.form.on("Fees", { $.each(r.message, function(i, d) { var row = frappe.model.add_child(frm.doc, "Fee Component", "components"); row.fees_category = d.fees_category; + row.description = d.description; row.amount = d.amount; }); }