feat: move financial statement switcher to page toolbar
diff --git a/erpnext/public/js/financial_statements.js b/erpnext/public/js/financial_statements.js
index 459c01b..b2f7afe 100644
--- a/erpnext/public/js/financial_statements.js
+++ b/erpnext/public/js/financial_statements.js
@@ -57,18 +57,22 @@
});
});
- 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'));
+ });
}
};