From f4832cf2b9cc9930149db2ca6bcc92b0c543f499 Mon Sep 17 00:00:00 2001 From: Kanchan Chauhan Date: Tue, 3 Jan 2017 16:29:41 +0530 Subject: [PATCH] [Enhancement] Summary link on Accounts Payable and Accounts Receivable --- .../accounts/report/accounts_payable/accounts_payable.js | 8 +++++++- .../accounts_payable_summary/accounts_payable_summary.js | 9 ++++++++- .../report/accounts_receivable/accounts_receivable.js | 9 ++++++++- .../accounts_receivable_summary.js | 9 ++++++++- 4 files changed, 31 insertions(+), 4 deletions(-) diff --git a/erpnext/accounts/report/accounts_payable/accounts_payable.js b/erpnext/accounts/report/accounts_payable/accounts_payable.js index a228c43c7e..3ab522e498 100644 --- a/erpnext/accounts/report/accounts_payable/accounts_payable.js +++ b/erpnext/accounts/report/accounts_payable/accounts_payable.js @@ -53,5 +53,11 @@ frappe.query_reports["Accounts Payable"] = { "default": "90", "reqd": 1 } - ] + ], + onload: function(report) { + report.page.add_inner_button(__("Accounts Payable Summary"), function() { + var filters = report.get_values(); + frappe.set_route('query-report', 'Accounts Payable Summary', {company: filters.company}); + }); + } } diff --git a/erpnext/accounts/report/accounts_payable_summary/accounts_payable_summary.js b/erpnext/accounts/report/accounts_payable_summary/accounts_payable_summary.js index b01c8bcdc4..0a1734ae22 100644 --- a/erpnext/accounts/report/accounts_payable_summary/accounts_payable_summary.js +++ b/erpnext/accounts/report/accounts_payable_summary/accounts_payable_summary.js @@ -53,5 +53,12 @@ frappe.query_reports["Accounts Payable Summary"] = { "default": "90", "reqd": 1 } - ] + ], + + onload: function(report) { + report.page.add_inner_button(__("Accounts Payable"), function() { + var filters = report.get_values(); + frappe.set_route('query-report', 'Accounts Payable', {company: filters.company}); + }); + } } diff --git a/erpnext/accounts/report/accounts_receivable/accounts_receivable.js b/erpnext/accounts/report/accounts_receivable/accounts_receivable.js index 3816c6f650..9bc5c2f2c1 100644 --- a/erpnext/accounts/report/accounts_receivable/accounts_receivable.js +++ b/erpnext/accounts/report/accounts_receivable/accounts_receivable.js @@ -53,5 +53,12 @@ frappe.query_reports["Accounts Receivable"] = { "default": "90", "reqd": 1 } - ] + ], + + onload: function(report) { + report.page.add_inner_button(__("Accounts Receivable Summary"), function() { + var filters = report.get_values(); + frappe.set_route('query-report', 'Accounts Receivable Summary', {company: filters.company}); + }); + } } diff --git a/erpnext/accounts/report/accounts_receivable_summary/accounts_receivable_summary.js b/erpnext/accounts/report/accounts_receivable_summary/accounts_receivable_summary.js index 0fe6bc686a..5cc0566717 100644 --- a/erpnext/accounts/report/accounts_receivable_summary/accounts_receivable_summary.js +++ b/erpnext/accounts/report/accounts_receivable_summary/accounts_receivable_summary.js @@ -53,5 +53,12 @@ frappe.query_reports["Accounts Receivable Summary"] = { "default": "90", "reqd": 1 } - ] + ], + + onload: function(report) { + report.page.add_inner_button(__("Accounts Receivable"), function() { + var filters = report.get_values(); + frappe.set_route('query-report', 'Accounts Receivable', {company: filters.company}); + }); + } }