Lines 232-249
if ( $pending_checkouts->count ) { # Useless test
Link Here
|
232 |
|
232 |
|
233 |
$issue->{'renewed'} = $renewed{ $issue->{'itemnumber'} }; |
233 |
$issue->{'renewed'} = $renewed{ $issue->{'itemnumber'} }; |
234 |
|
234 |
|
|
|
235 |
use Data::Printer colored => 1; warn p $renewerror; |
235 |
if (@$renewerror) { |
236 |
if (@$renewerror) { |
236 |
$renewerror = $renewerror->[0]; |
237 |
$issue->{'too_many'} = 1 if grep { $_ eq 'too_many' } @$renewerror; |
237 |
$issue->{'too_many'} = 1 if $renewerror eq 'too_many'; |
238 |
$issue->{'on_reserve'} = 1 if grep { $_ eq 'on_reserve' } @$renewerror; |
238 |
$issue->{'on_reserve'} = 1 if $renewerror eq 'on_reserve'; |
239 |
$issue->{'norenew_overdue'} = 1 if grep { $_ eq 'overdue' } @$renewerror; |
239 |
$issue->{'norenew_overdue'} = 1 if $renewerror eq 'overdue'; |
240 |
$issue->{'auto_renew'} = 1 if grep { $_ eq 'auto_renew' } @$renewerror; |
240 |
$issue->{'auto_renew'} = 1 if $renewerror eq 'auto_renew'; |
241 |
$issue->{'auto_too_soon'} = 1 if grep { $_ eq 'auto_too_soon' } @$renewerror; |
241 |
$issue->{'auto_too_soon'} = 1 if $renewerror eq 'auto_too_soon'; |
242 |
$issue->{'auto_too_late'} = 1 if grep { $_ eq 'auto_too_late' } @$renewerror; |
242 |
$issue->{'auto_too_late'} = 1 if $renewerror eq 'auto_too_late'; |
243 |
$issue->{'auto_too_much_oweing'} = 1 if grep { $_ eq 'auto_too_much_oweing' } @$renewerror; |
243 |
$issue->{'auto_too_much_oweing'} = 1 if $renewerror eq 'auto_too_much_oweing'; |
244 |
$issue->{'item_denied_renewal'} = 1 if grep { $_ eq 'item_denied_renewal' } @$renewerror; |
244 |
$issue->{'item_denied_renewal'} = 1 if $renewerror eq 'item_denied_renewal'; |
245 |
|
245 |
|
246 |
if ( grep { $_ eq 'too_soon' } @$renewerror ) { |
246 |
if ( $renewerror eq 'too_soon' ) { |
|
|
247 |
$issue->{'too_soon'} = 1; |
247 |
$issue->{'too_soon'} = 1; |
248 |
$issue->{'soonestrenewdate'} = output_pref( |
248 |
$issue->{'soonestrenewdate'} = output_pref( |
249 |
C4::Circulation::GetSoonestRenewDate( |
249 |
C4::Circulation::GetSoonestRenewDate( |
Lines 254-259
if ( $pending_checkouts->count ) { # Useless test
Link Here
|
254 |
} |
254 |
} |
255 |
} |
255 |
} |
256 |
|
256 |
|
|
|
257 |
$issue->{can_renew} = ! scalar @$renewerror; |
258 |
|
257 |
if ( $c->is_overdue ) { |
259 |
if ( $c->is_overdue ) { |
258 |
push @overdues, $issue; |
260 |
push @overdues, $issue; |
259 |
$overdues_count++; |
261 |
$overdues_count++; |
Lines 301-307
if ( $pending_checkouts->count ) { # Useless test
Link Here
|
301 |
} |
303 |
} |
302 |
} |
304 |
} |
303 |
my $overduesblockrenewing = C4::Context->preference('OverduesBlockRenewing'); |
305 |
my $overduesblockrenewing = C4::Context->preference('OverduesBlockRenewing'); |
304 |
$canrenew = 0 if ($overduesblockrenewing ne 'allow' and $overdues_count == $count); |
306 |
my $canrenew_count = grep { $_->{canrenew} } @issuedat; |
|
|
307 |
$canrenew = 0 |
308 |
if ( $overduesblockrenewing ne 'allow' |
309 |
&& $overdues_count == $count ) |
310 |
|| $canrenew_count == 0; |
305 |
|
311 |
|
306 |
$template->param( ISSUES => \@issuedat ); |
312 |
$template->param( ISSUES => \@issuedat ); |
307 |
$template->param( issues_count => $count ); |
313 |
$template->param( issues_count => $count ); |
308 |
- |
|
|