From 91b8a49a16de91003a6fc86426f31bc0e4bd937f Mon Sep 17 00:00:00 2001 From: Owen Leonard Date: Wed, 29 Jul 2020 13:49:16 +0000 Subject: [PATCH] Bug 26087: Add table configuration and export options to orders by fund report This patch adds column configuration to the orders by funds report results table. The "Basket" column is excluded from being togglable. To test, apply the patch and clear your browser cache if necessary. - Go to Reports -> Orders by fund - Submit parameters which will return multiple results. - Test that the "Column visibility" button works to show and hide columns. The "Basket" column should be excluded. - Test the export options (Excel, CSV, etc) - Go to Administration -> Columns settings and edit the default configuration of the orders by fund report. Confirm that these changes are reflected in the report results. --- admin/columns_settings.yml | 40 ++++++++++++++++++++++ .../prog/en/modules/reports/orders_by_budget.tt | 21 +++++++----- 2 files changed, 53 insertions(+), 8 deletions(-) diff --git a/admin/columns_settings.yml b/admin/columns_settings.yml index 05308af99d..f189436466 100644 --- a/admin/columns_settings.yml +++ b/admin/columns_settings.yml @@ -915,6 +915,46 @@ modules: - columnname: notes + orders_by_fund: + funds-table: + default_display_length: 20 + default_sort_order: 0 + columns: + - + columnname: fund + - + columnname: basket + cannot_be_toggled: 1 + cannot_be_modified: 1 + - + columnname: basket_name + - + columnname: basket_by + - + columnname: title + - + columnname: currency + - + columnname: list_price + - + columnname: rrp + - + columnname: budgeted_cost + - + columnname: quantity + - + columnname: total_rrp + - + columnname: total_cost + - + columnname: entry_date + - + columnname: date_received + - + columnname: internal_note + - + columnname: vendor_note + saved-sql: table_reports: columns: diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/reports/orders_by_budget.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/reports/orders_by_budget.tt index 89a9d0c915..274bf4c99e 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/reports/orders_by_budget.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/reports/orders_by_budget.tt @@ -1,6 +1,7 @@ [% USE raw %] [% USE Asset %] [% USE Price %] +[% USE TablesSettings %] [% SET footerjs = 1 %] [% INCLUDE 'doc-head-open.inc' %] Koha › Reports › Orders by fund @@ -23,13 +24,6 @@ [% END %] [% IF ( get_orders ) %] -
- [% IF ( total ) %] - Orders found: [% total | html %] - [% ELSE %] - No order found - [% END %] -
[% IF ( ordersloop ) %] @@ -150,9 +144,20 @@ [% MACRO jsinclude BLOCK %] [% INCLUDE 'datatables.inc' %] + [% INCLUDE 'columns_settings.inc' %]