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 (#27769)

* fix: Added a new button "View" and merged "Accounting Ledger" and "Accounts Receivable" into it

* fix: sider issues

* chore: dead code
  • Loading branch information
Komal-Saraf0609 authored Oct 4, 2021
1 parent 9051735 commit b483f17
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 b483f17

Please sign in to comment.