Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
use CGI qw ( -utf8 );
use Date::Calc qw/Today Add_Delta_YM/;
+use POSIX qw( ceil );
use C4::Context;
use C4::Output;
my @reservedata;
while ( my $data = $sth->fetchrow_hashref ) {
my $thisratio = $data->{reservecount} / $data->{itemcount};
- my $ratiocalc = $data->{reservecount}/$ratio - $data->{itemcount};
+ my $ratiocalc = ceil($data->{reservecount}/$ratio - $data->{itemcount});
$ratiocalc >= 1 or next; # TODO: tighter targeting -- get ratio limit into SQL using HAVING clause
push(
@reservedata,