From 1c3830c53f38136de0e481f7c4f8ffda58b63709 Mon Sep 17 00:00:00 2001 From: bghayad Date: Tue, 24 Apr 2018 09:42:11 +0300 Subject: [PATCH] Student Account Ledger Button (#13591) * Student Account Ledger Button * Student Account Ledger Button * Student Account Ledger Button * Student Account Ledger Button --- erpnext/education/doctype/student/student.js | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/erpnext/education/doctype/student/student.js b/erpnext/education/doctype/student/student.js index cadf272a1f..2c933e28b7 100644 --- a/erpnext/education/doctype/student/student.js +++ b/erpnext/education/doctype/student/student.js @@ -15,5 +15,15 @@ frappe.ui.form.on('Student', { } }; }) + }, + refresh: function(frm) { + if(!frm.is_new()) { + + // custom buttons + frm.add_custom_button(__('Accounting Ledger'), function() { + frappe.set_route('query-report', 'General Ledger', + {party_type:'Student', party:frm.doc.name}); + }); + } } -}); \ No newline at end of file +});