Browse Source

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.

Signed-off-by: Sally <sally.healey@cheshiresharedservices.gov.uk>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
20.11.x
Owen Leonard 3 years ago
committed by Jonathan Druart
parent
commit
b332e0912d
  1. 40
      admin/columns_settings.yml
  2. 21
      koha-tmpl/intranet-tmpl/prog/en/modules/reports/orders_by_budget.tt

40
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:

21
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' %]
<title>Koha &rsaquo; Reports &rsaquo; Orders by fund</title>
@ -23,13 +24,6 @@
[% END %]
[% IF ( get_orders ) %]
<div class="results">
[% IF ( total ) %]
Orders found: [% total | html %]
[% ELSE %]
No order found
[% END %]
</div>
[% IF ( ordersloop ) %]<table id="funds">
<thead>
@ -150,9 +144,20 @@
[% MACRO jsinclude BLOCK %]
[% INCLUDE 'datatables.inc' %]
[% INCLUDE 'columns_settings.inc' %]
<script>
var columns_settings = [% TablesSettings.GetColumns( 'reports', 'orders_by_fund', 'funds-table', 'json' ) | $raw %];
[% SET table_settings = TablesSettings.GetTableSettings( 'reports', 'orders_by_fund', 'funds-table' ) %];
$(document).ready( function () {
$('#funds').DataTable($.extend(true, {}, dataTablesDefaults,{"sPaginationType": "full_numbers"}));
var funds_table = KohaTable("funds", {
"columnDefs": [
{ "sortable": false, "searchable": false, 'targets': [ 'NoSort' ] },
{ "type": "title-string", "targets" : [ "title-string" ] }
],
"pageLength": [% table_settings.default_display_length | html %],
"order": [[ [% table_settings.default_sort_order | html %], 'asc']],
'autoWidth': false,
}, columns_settings );
showallbudgets = $('#budgetfilter').html();
$('#budgetfilter .b_inactive').remove();

Loading…
Cancel
Save