diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/reports/bor_issues_top.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/reports/bor_issues_top.tt
index 0a87c6de4e..6fc0d546ae 100644
--- a/koha-tmpl/intranet-tmpl/prog/en/modules/reports/bor_issues_top.tt
+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/reports/bor_issues_top.tt
@@ -1,3 +1,6 @@
+[% USE Branches %]
+[% USE KohaDates %]
+[% USE ItemTypes %]
[% INCLUDE 'doc-head-open.inc' %]
Koha › Reports › Patrons with the most checkouts
[% INCLUDE 'doc-head-close.inc' %]
@@ -57,12 +60,41 @@ function Dopop(link) {
[% FOREACH mainloo IN mainloop %]
- Top [% mainloo.limit %] List patrons for checkouts
+ Patrons with the most checkouts
[% IF ( mainloo.loopfilter ) %]
- Filtered on:
- [% FOREACH loopfilte IN mainloo.loopfilter %]
- [% IF ( loopfilte.err ) %] [% END %] [% loopfilte.crit %] =[% loopfilte.filter %][% IF ( loopfilte.err ) %] [% END %]
- [% END %]
+ [% IF mainloo.loopfilter.size %]
+ Filtered on:
+
+ [% FOREACH loopfilte IN mainloo.loopfilter %]
+ -
+ [% SWITCH loopfilte.crit -%]
+ [% CASE "Issue From" -%]
+ Checked out after [% loopfilte.filter | $KohaDates %]
+ [% CASE "Issue To" -%]
+ Checked out before [% loopfilte.filter | $KohaDates %]
+ [% CASE "Return From" -%]
+ Checked in after [% loopfilte.filter | $KohaDates %]
+ [% CASE "Return To" -%]
+ Checked in before [% loopfilte.filter | $KohaDates %]
+ [% CASE "Branch" -%]
+ Library is [% Branches.GetName( loopfilte.filter ) %]
+ [% CASE "Doc Type" -%]
+ Item type is [% ItemTypes.GetDescription( loopfilte.filter ) %]
+ [% CASE "Bor Cat" -%]
+ Patron category code is [% loopfilte.filter %]
+ [% CASE "Day" -%]
+ Day is [% loopfilte.filter %]
+ [% CASE "Month" -%]
+ Month is [% loopfilte.filter %]
+ [% CASE "Year" -%]
+ Year is [% loopfilte.filter %]
+ [% CASE # default case -%]
+ [% loopfilte.crit %] = [% loopfilte.filter %]
+ [% END -%]
+
+ [% END %]
+
+ [% END %]
[% END %]
diff --git a/reports/bor_issues_top.pl b/reports/bor_issues_top.pl
index bdd58bab90..f8ee8e8c17 100755
--- a/reports/bor_issues_top.pl
+++ b/reports/bor_issues_top.pl
@@ -181,7 +181,7 @@ sub calculate {
$cell{err} = 1 if (@$filters[$i]<@$filters[$i-1]) ;
}
# format the dates filters, otherwise just fill as is
- $cell{filter} .= ($i>=4) ? @$filters[$i] : format_date(@$filters[$i]);
+ $cell{filter} .= @$filters[$i];
defined ($cellmap[$i]) and
$cell{crit} .= $cellmap[$i];
push @loopfilter, \%cell;