From 21a5498d5d7e21ff1b9321aa7896a36bf64db83f Mon Sep 17 00:00:00 2001 From: "mergify[bot]" <37929162+mergify[bot]@users.noreply.github.com> Date: Mon, 4 Oct 2021 16:06:55 +0530 Subject: [PATCH] fix: Merge "Accounting Ledger" and "Accounts Receivable" in "View" button (#27769) (#27771) * fix: Added a new button "View" and merged "Accounting Ledger" and "Accounts Receivable" into it * fix: sider issues * chore: dead code (cherry picked from commit b483f173a6ea1082d9e5b6e0c232f99f0367fa73) Co-authored-by: Komal-Saraf0609 <81952590+Komal-Saraf0609@users.noreply.github.com> --- erpnext/selling/doctype/customer/customer.js | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/erpnext/selling/doctype/customer/customer.js b/erpnext/selling/doctype/customer/customer.js index 8416901b7cb..f277d7cca0a 100644 --- a/erpnext/selling/doctype/customer/customer.js +++ b/erpnext/selling/doctype/customer/customer.js @@ -116,14 +116,15 @@ frappe.ui.form.on("Customer", { frappe.contacts.render_address_and_contact(frm); // custom buttons - frm.add_custom_button(__('Accounting Ledger'), function() { - frappe.set_route('query-report', 'General Ledger', - {party_type:'Customer', party:frm.doc.name}); - }); - frm.add_custom_button(__('Accounts Receivable'), function() { + frm.add_custom_button(__('Accounts Receivable'), function () { frappe.set_route('query-report', 'Accounts Receivable', {customer:frm.doc.name}); - }); + }, __('View')); + + frm.add_custom_button(__('Accounting Ledger'), function () { + frappe.set_route('query-report', 'General Ledger', + {party_type: 'Customer', party: frm.doc.name}); + }, __('View')); frm.add_custom_button(__('Pricing Rule'), function () { erpnext.utils.make_pricing_rule(frm.doc.doctype, frm.doc.name);