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