From 027d2068501027b99328c5f13cde07f126618df4 Mon Sep 17 00:00:00 2001 From: Alex Arnaud Date: Thu, 15 Sep 2016 14:27:24 +0000 Subject: [PATCH] Bug 17282 - Ability to exclude the last line in report results This patch add a checkbox (exclude last line). This is useful when this last is the result of a sql rollup which is the sum of each column and make the chart not consistent Signed-off-by: Josef Moravec --- koha-tmpl/intranet-tmpl/prog/en/includes/chart.inc | 3 +++ .../intranet-tmpl/prog/en/modules/reports/guided_reports_start.tt | 4 ++++ 2 files changed, 7 insertions(+) diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/chart.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/chart.inc index ebb86ad..0ec5a32 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/includes/chart.inc +++ b/koha-tmpl/intranet-tmpl/prog/en/includes/chart.inc @@ -27,6 +27,9 @@ + + + [% column = 1 %]
[% FOREACH header IN header_row %] diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/reports/guided_reports_start.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/reports/guided_reports_start.tt index 1cf73b7..71489bd 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/reports/guided_reports_start.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/reports/guided_reports_start.tt @@ -965,6 +965,10 @@ canned reports and writing custom SQL reports.

headers = [% header_row.json %]; var results = [% results.json %] + if ($('input[name="chart-exclude-last"]').prop('checked')) { + results.splice(-1, 1); + } + $('select[name="y"]').each(function( index ) { y_elements.push( $(this).val() ); }); -- 2.7.4