Lines 41-46
use Koha::Database;
Link Here
|
41 |
|
41 |
|
42 |
use constant ATTRIBUTE_SHOW_BARCODE => 'SHOW_BCODE'; |
42 |
use constant ATTRIBUTE_SHOW_BARCODE => 'SHOW_BCODE'; |
43 |
|
43 |
|
|
|
44 |
use Scalar::Util qw(looks_like_number); |
44 |
use Date::Calc qw( |
45 |
use Date::Calc qw( |
45 |
Today |
46 |
Today |
46 |
Add_Delta_Days |
47 |
Add_Delta_Days |
Lines 107-120
if ( 5 >= $borr->{'amountoutstanding'} && $borr->{'amountoutstanding'} > 0 ) {
Link Here
|
107 |
$borr->{'amountoverzero'} = 1; |
108 |
$borr->{'amountoverzero'} = 1; |
108 |
} |
109 |
} |
109 |
my $no_renewal_amt = C4::Context->preference( 'OPACFineNoRenewals' ); |
110 |
my $no_renewal_amt = C4::Context->preference( 'OPACFineNoRenewals' ); |
110 |
$no_renewal_amt ||= undef; |
111 |
$no_renewal_amt = undef unless looks_like_number( $no_renewal_amt ); |
111 |
|
112 |
|
112 |
if ( C4::Context->preference( 'OpacRenewalAllowed' ) && $no_renewal_amt && $borr->{amountoutstanding} > $no_renewal_amt ) { |
113 |
if ( C4::Context->preference('OpacRenewalAllowed') |
|
|
114 |
&& defined($no_renewal_amt) |
115 |
&& $borr->{amountoutstanding} > $no_renewal_amt ) |
116 |
{ |
113 |
$borr->{'flagged'} = 1; |
117 |
$borr->{'flagged'} = 1; |
114 |
$canrenew = 0; |
118 |
$canrenew = 0; |
115 |
$template->param( |
119 |
$template->param( |
116 |
renewal_blocked_fines => sprintf( '%.02f', $no_renewal_amt ), |
120 |
renewal_blocked_fines => sprintf( '%.02f', $no_renewal_amt ), |
117 |
renewal_blocked_fines_amountoutstanding => sprintf( '%.02f', $borr->{amountoutstanding} ), |
121 |
renewal_blocked_fines_amountoutstanding => |
|
|
122 |
sprintf( '%.02f', $borr->{amountoutstanding} ), |
118 |
); |
123 |
); |
119 |
} |
124 |
} |
120 |
|
125 |
|
121 |
- |
|
|