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