From b63693abe3bf27a7d5505763303bbe53090dd9e7 Mon Sep 17 00:00:00 2001 From: Fridolin Somers Date: Fri, 6 Sep 2019 10:08:19 +0200 Subject: [PATCH] Revert "Bug 23273: Fix CSV export for overdues" This reverts commit 1e63658b308507bb5e23bff4250b0425f2b614e3. --- circ/overdue.pl | 30 +++++++------------ .../prog/en/modules/circ/overdue.tt | 18 +++++------ 2 files changed, 18 insertions(+), 30 deletions(-) diff --git a/circ/overdue.pl b/circ/overdue.pl index f5683bda22..0b6f0f802a 100755 --- a/circ/overdue.pl +++ b/circ/overdue.pl @@ -39,30 +39,16 @@ my $borflagsfilter = $input->param('borflag') || ''; my $branchfilter = $input->param('branch') || ''; my $homebranchfilter = $input->param('homebranch') || ''; my $holdingbranchfilter = $input->param('holdingbranch') || ''; -my $dateduefrom = $input->param('dateduefrom'); -my $datedueto = $input->param('datedueto'); my $op = $input->param('op') || ''; -if ( $dateduefrom ) { +my ($dateduefrom, $datedueto); +if ( $dateduefrom = $input->param('dateduefrom') ) { $dateduefrom = dt_from_string( $dateduefrom ); } -if ( $datedueto ) { +if ( $datedueto = $input->param('datedueto') ) { $datedueto = dt_from_string( $datedueto )->set_hour(23)->set_minute(59); } -my $filters = { - itemtype => $itemtypefilter, - borname => $bornamefilter, - borcat => $borcatfilter, - itemtype => $itemtypefilter, - borflag => $borflagsfilter, - branch => $branchfilter, - homebranch => $homebranchfilter, - holdingbranch => $holdingbranchfilter, - dateduefrom => $dateduefrom, - datedueto => $datedueto, -}; - my $isfiltered = $op =~ /apply/i && $op =~ /filter/i; my $noreport = C4::Context->preference('FilterBeforeOverdueReport') && ! $isfiltered && $op ne "csv"; @@ -193,14 +179,18 @@ if (@patron_attr_filter_loop) { } -use Data::Printer colored => 1; warn p $filters; $template->param( patron_attr_header_loop => [ map { { header => $_->{description} } } grep { ! $_->{isclone} } @patron_attr_filter_loop ], - filters => $filters, + branchfilter => $branchfilter, + homebranchfilter => $homebranchfilter, + holdingbranchfilter => $holdingbranchfilter, borcatloop=> \@borcatloop, itemtypeloop => \@itemtypeloop, patron_attr_filter_loop => \@patron_attr_filter_loop, + borname => $bornamefilter, showall => $showall, + dateduefrom => $dateduefrom, + datedueto => $datedueto, ); if ($noreport) { @@ -356,8 +346,10 @@ if ($noreport) { # generate parameter list for CSV download link my $new_cgi = CGI->new($input); $new_cgi->delete('op'); + my $csv_param_string = $new_cgi->query_string(); $template->param( + csv_param_string => $csv_param_string, todaysdate => output_pref($today_dt), overdueloop => \@overduedata, nnoverdue => scalar(@overduedata), diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/overdue.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/overdue.tt index 0649d944a7..ad0d0594b8 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/overdue.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/overdue.tt @@ -34,11 +34,7 @@

[% IF ( isfiltered ) %] - [% SET url_params = '' %] - [% FOR var IN filters.keys %] - [% url_params = BLOCK %][% url_params %]&[% var | uri %]=[% filters.$var | uri %][% END %] - [% END %] - Download file of displayed overdues + Download file of displayed overdues [% ELSE %] Download file of all overdues [% END %] @@ -106,15 +102,15 @@

Date due:
  1. - +
  2. - +
    -
  1. +
  2. - [% PROCESS options_for_libraries libraries => Branches.all( selected => filters.homebranch ) %] + [% PROCESS options_for_libraries libraries => Branches.all( selected => homebranchfilter ) %]
  3. @@ -179,7 +175,7 @@ @@ -187,7 +183,7 @@ -- 2.39.5