feat: move financial statement switcher to page toolbar

This commit is contained in:
Shivam Mishra 2020-07-09 16:51:36 +05:30
parent f59d927f73
commit b6fb13258f

View File

@ -57,18 +57,22 @@ erpnext.financial_statements = {
});
});
report.page.add_inner_button(__("Balance Sheet"), function() {
const views_menu = report.page.add_custom_button_group(__('Financial Statements'));
report.page.add_custom_menu_item(views_menu, __("Balance Sheet"), function() {
var filters = report.get_values();
frappe.set_route('query-report', 'Balance Sheet', {company: filters.company});
}, __('Financial Statements'));
report.page.add_inner_button(__("Profit and Loss"), function() {
});
report.page.add_custom_menu_item(views_menu, __("Profit and Loss"), function() {
var filters = report.get_values();
frappe.set_route('query-report', 'Profit and Loss Statement', {company: filters.company});
}, __('Financial Statements'));
report.page.add_inner_button(__("Cash Flow Statement"), function() {
});
report.page.add_custom_menu_item(views_menu, __("Cash Flow Statement"), function() {
var filters = report.get_values();
frappe.set_route('query-report', 'Cash Flow', {company: filters.company});
}, __('Financial Statements'));
});
}
};