From 23e4eb050d8cdc67cbefcc30dab23574d2bacb42 Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Thu, 12 Dec 2019 11:07:31 +0100 Subject: [PATCH] Bug 23243: Adjust previous patch MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Martin Renvoize Signed-off-by: Séverine QUEUNE Signed-off-by: Katrin Fischer --- koha-tmpl/intranet-tmpl/prog/en/modules/serials/checkexpiration.tt | 7 +++++-- serials/checkexpiration.pl | 4 ++-- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/serials/checkexpiration.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/serials/checkexpiration.tt index 196516d02f..019d415fe6 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/serials/checkexpiration.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/serials/checkexpiration.tt @@ -61,8 +61,11 @@
  • - + [% IF showhistoricexpired %] + + [% ELSE %] + + [% END %]
  • diff --git a/serials/checkexpiration.pl b/serials/checkexpiration.pl index 2b6f202134..aeebd2f5bc 100755 --- a/serials/checkexpiration.pl +++ b/serials/checkexpiration.pl @@ -69,7 +69,7 @@ my $issn = $query->param('issn'); my $branch = $query->param('branch'); my $date = $query->param('date'); $date = eval { dt_from_string( scalar $query->param('date') ) } if $date; -my $showhistoricexpired = $query->param('showhistoryexpired'); +my $showhistoricexpired = $query->param('showhistoricexpired'); if ($date) { my @subscriptions = SearchSubscriptions({ title => $title, issn => $issn, orderby => 'title' }); @@ -96,7 +96,7 @@ if ($date) { my $expirationdate_dt = dt_from_string( $expirationdate, 'iso' ); my $today_dt = dt_from_string(); if ( DateTime->compare( $date, $expirationdate_dt ) == 1 - && ( $showhistoricexpired || DateTime->compare( $expiration_dt, $today_dt ) == 1 ) + && ( $showhistoricexpired || DateTime->compare( $expirationdate_dt, $today_dt ) == 1 ) && ( !$branch || ( $subscription->{'branchcode'} eq $branch ) ) ) { push @subscriptions_loop, $subscription; } -- 2.11.0