View | Details | Raw Unified | Return to bug 15422
Collapse All | Expand All

(-)a/circ/reserveratios.pl (-2 / +2 lines)
Lines 22-27 use Modern::Perl; Link Here
22
22
23
use CGI qw ( -utf8 );
23
use CGI qw ( -utf8 );
24
use Date::Calc qw/Today Add_Delta_YM/;
24
use Date::Calc qw/Today Add_Delta_YM/;
25
use POSIX qw( ceil );
25
26
26
use C4::Context;
27
use C4::Context;
27
use C4::Output;
28
use C4::Output;
Lines 151-157 $sth->execute(@query_params); Link Here
151
my @reservedata;
152
my @reservedata;
152
while ( my $data = $sth->fetchrow_hashref ) {
153
while ( my $data = $sth->fetchrow_hashref ) {
153
    my $thisratio = $data->{reservecount} / $data->{itemcount};
154
    my $thisratio = $data->{reservecount} / $data->{itemcount};
154
    my $ratiocalc = $data->{reservecount}/$ratio - $data->{itemcount};
155
    my $ratiocalc = ceil($data->{reservecount}/$ratio - $data->{itemcount});
155
    $ratiocalc >= 1 or next;  # TODO: tighter targeting -- get ratio limit into SQL using HAVING clause
156
    $ratiocalc >= 1 or next;  # TODO: tighter targeting -- get ratio limit into SQL using HAVING clause
156
    my $record = GetMarcBiblio({ biblionumber => $data->{biblionumber} });
157
    my $record = GetMarcBiblio({ biblionumber => $data->{biblionumber} });
157
    $data->{subtitle} = GetRecordValue('subtitle', $record, GetFrameworkCode($data->{biblionumber}));
158
    $data->{subtitle} = GetRecordValue('subtitle', $record, GetFrameworkCode($data->{biblionumber}));
158
- 

Return to bug 15422