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

(-)a/opac/opac-reserve.pl (-2 / +4 lines)
Lines 45-50 use Koha::Patrons; Link Here
45
use Date::Calc qw/Today Date_to_Days/;
45
use Date::Calc qw/Today Date_to_Days/;
46
use List::MoreUtils qw/uniq/;
46
use List::MoreUtils qw/uniq/;
47
47
48
use Scalar::Util qw(looks_like_number);
49
48
my $maxreserves = C4::Context->preference("maxreserves");
50
my $maxreserves = C4::Context->preference("maxreserves");
49
51
50
my $query = new CGI;
52
my $query = new CGI;
Lines 339-347 if ( $query->param('place_reserve') ) { Link Here
339
#
341
#
340
my $noreserves     = 0;
342
my $noreserves     = 0;
341
my $maxoutstanding = C4::Context->preference("maxoutstanding");
343
my $maxoutstanding = C4::Context->preference("maxoutstanding");
344
$maxoutstanding = undef unless looks_like_number($maxoutstanding);
342
$template->param( noreserve => 1 ) unless $maxoutstanding;
345
$template->param( noreserve => 1 ) unless $maxoutstanding;
343
my $amountoutstanding = $patron->account->balance;
346
my $amountoutstanding = $patron->account->balance;
344
if ( $amountoutstanding && ($amountoutstanding > $maxoutstanding) ) {
347
if ( $amountoutstanding && defined($maxoutstanding) && ($amountoutstanding > $maxoutstanding) ) {
345
    my $amount = sprintf "%.02f", $amountoutstanding;
348
    my $amount = sprintf "%.02f", $amountoutstanding;
346
    $template->param( message => 1 );
349
    $template->param( message => 1 );
347
    $noreserves = 1;
350
    $noreserves = 1;
348
- 

Return to bug 25220