fix: Merge "Accounting Ledger" and "Accounts Receivable" in "View" button (#27769)

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

* fix: sider issues

* chore: dead code
This commit is contained in:
Komal-Saraf0609 2021-10-04 15:42:43 +05:30 committed by GitHub
parent 9051735529
commit b483f173a6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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);