Skip to content

Commit

Permalink
fix: Merge "Accounting Ledger" and "Accounts Receivable" in "View" bu…
Browse files Browse the repository at this point in the history
…tton (frappe#27769) (frappe#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 b483f17)

Co-authored-by: Komal-Saraf0609 <81952590+Komal-Saraf0609@users.noreply.github.com>
  • Loading branch information
mergify[bot] and Komal-Saraf0609 authored Oct 4, 2021
1 parent e9ed379 commit 21a5498
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions erpnext/selling/doctype/customer/customer.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 21a5498

Please sign in to comment.