Lines 69-74
my $issn = $query->param('issn');
Link Here
|
69 |
my $branch = $query->param('branch'); |
69 |
my $branch = $query->param('branch'); |
70 |
my $date = $query->param('date'); |
70 |
my $date = $query->param('date'); |
71 |
$date = eval { dt_from_string( scalar $query->param('date') ) } if $date; |
71 |
$date = eval { dt_from_string( scalar $query->param('date') ) } if $date; |
|
|
72 |
my $showhistoricexpired = $query->param('showhistoryexpired'); |
72 |
|
73 |
|
73 |
if ($date) { |
74 |
if ($date) { |
74 |
my @subscriptions = SearchSubscriptions({ title => $title, issn => $issn, orderby => 'title' }); |
75 |
my @subscriptions = SearchSubscriptions({ title => $title, issn => $issn, orderby => 'title' }); |
Lines 93-112
if ($date) {
Link Here
|
93 |
next if $subscription->{cannotedit}; |
94 |
next if $subscription->{cannotedit}; |
94 |
|
95 |
|
95 |
my $expirationdate_dt = dt_from_string( $expirationdate, 'iso' ); |
96 |
my $expirationdate_dt = dt_from_string( $expirationdate, 'iso' ); |
|
|
97 |
my $today_dt = dt_from_string(); |
96 |
if ( DateTime->compare( $date, $expirationdate_dt ) == 1 |
98 |
if ( DateTime->compare( $date, $expirationdate_dt ) == 1 |
|
|
99 |
&& ( $showhistoricexpired || DateTime->compare( $expiration_dt, $today_dt ) == 1 ) |
97 |
&& ( !$branch || ( $subscription->{'branchcode'} eq $branch ) ) ) { |
100 |
&& ( !$branch || ( $subscription->{'branchcode'} eq $branch ) ) ) { |
98 |
push @subscriptions_loop, $subscription; |
101 |
push @subscriptions_loop, $subscription; |
99 |
} |
102 |
} |
100 |
} |
103 |
} |
101 |
|
104 |
|
102 |
$template->param ( |
105 |
$template->param( |
103 |
title => $title, |
106 |
title => $title, |
104 |
issn => $issn, |
107 |
issn => $issn, |
105 |
numsubscription => scalar @subscriptions_loop, |
108 |
showhistoricexpired => $showhistoricexpired, |
106 |
date => $date, |
109 |
numsubscription => scalar @subscriptions_loop, |
107 |
subscriptions_loop => \@subscriptions_loop, |
110 |
date => $date, |
108 |
"BiblioDefaultView".C4::Context->preference("BiblioDefaultView") => 1, |
111 |
subscriptions_loop => \@subscriptions_loop, |
109 |
searched => 1, |
112 |
"BiblioDefaultView" . C4::Context->preference("BiblioDefaultView") => 1, |
|
|
113 |
searched => 1, |
110 |
); |
114 |
); |
111 |
} |
115 |
} |
112 |
|
116 |
|
113 |
- |
|
|