X-Git-Url: http://git.rot13.org/?a=blobdiff_plain;f=reports%2Fserials_stats.pl;h=36f7cc5d5ddfde2e6567c204f9964a6f47622bea;hb=5a61a3bbfe94b3f3a2210dbd78884c8b53c5b533;hp=9aff54b722a770a1b73dd2a40c9fd6928ad83284;hpb=65be03846d064dd6d9e7159550a269a352054b65;p=koha.git diff --git a/reports/serials_stats.pl b/reports/serials_stats.pl index 9aff54b722..36f7cc5d5d 100755 --- a/reports/serials_stats.pl +++ b/reports/serials_stats.pl @@ -96,9 +96,19 @@ if($do_it){ while(my $row = $sth->fetchrow_hashref){ $row->{'enddate'} = format_date(GetExpirationDate($row->{'subscriptionid'})); $row->{'startdate'} = format_date($row->{'startdate'}); - push @datas, $row if ($expired || (not $expired && not HasSubscriptionExpired($row->{subscriptionid})) ); + $row->{expired} = HasSubscriptionExpired($row->{subscriptionid}); + push @datas, $row if ( + $expired + or ( + not $expired + and ( + not $row->{expired} + and not $row->{closed} + ) + ) + ); } - + if($output eq 'screen'){ $template->param(datas => \@datas, do_it => 1);