X-Git-Url: http://koha-dev.rot13.org:8081/gitweb/?a=blobdiff_plain;f=reports%2Fserials_stats.pl;h=36f7cc5d5ddfde2e6567c204f9964a6f47622bea;hb=264de2962112f4084f39374a11164ed2b926f59c;hp=9aff54b722a770a1b73dd2a40c9fd6928ad83284;hpb=491c02f2e1c84bd3708e7b44d58234ad52d076ae;p=koha_fer 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);