Lines 123-138
if ( $userdebarred || $borr->{'gonenoaddress'} || $borr->{'lost'} ) {
Link Here
|
123 |
my $amountoutstanding = $patron->account->balance; |
123 |
my $amountoutstanding = $patron->account->balance; |
124 |
my $no_renewal_amt = C4::Context->preference( 'OPACFineNoRenewals' ); |
124 |
my $no_renewal_amt = C4::Context->preference( 'OPACFineNoRenewals' ); |
125 |
$no_renewal_amt = undef unless looks_like_number( $no_renewal_amt ); |
125 |
$no_renewal_amt = undef unless looks_like_number( $no_renewal_amt ); |
|
|
126 |
my $amountoutstandingfornewal = |
127 |
C4::Context->preference("OPACFineNoRenewalsIncludeCredit") |
128 |
? $amountoutstanding |
129 |
: $patron->account->outstanding_debits->total_outstanding; |
126 |
|
130 |
|
127 |
if ( C4::Context->preference('OpacRenewalAllowed') |
131 |
if ( C4::Context->preference('OpacRenewalAllowed') |
128 |
&& defined($no_renewal_amt) |
132 |
&& defined($no_renewal_amt) |
129 |
&& $amountoutstanding > $no_renewal_amt ) |
133 |
&& $amountoutstandingfornewal > $no_renewal_amt ) |
130 |
{ |
134 |
{ |
131 |
$borr->{'flagged'} = 1; |
135 |
$borr->{'flagged'} = 1; |
132 |
$canrenew = 0; |
136 |
$canrenew = 0; |
133 |
$template->param( |
137 |
$template->param( |
134 |
renewal_blocked_fines => $no_renewal_amt, |
138 |
renewal_blocked_fines => $no_renewal_amt, |
135 |
renewal_blocked_fines_amountoutstanding => $amountoutstanding, |
139 |
renewal_blocked_fines_amountoutstanding => $amountoutstandingfornewal, |
136 |
); |
140 |
); |
137 |
} |
141 |
} |
138 |
|
142 |
|
139 |
- |
|
|