Lines 460-468
foreach my $biblioNum (@biblionumbers) {
Link Here
|
460 |
} |
460 |
} |
461 |
} |
461 |
} |
462 |
|
462 |
|
463 |
my @notforloan_avs = Koha::AuthorisedValues->search_by_koha_field({ kohafield => 'items.notforloan', frameworkcode => $frameworkcode }); |
|
|
464 |
my $notforloan_label_of = { map { $_->authorised_value => $_->opac_description } @notforloan_avs }; |
465 |
|
466 |
my $visible_items = { map { $_->itemnumber => $_ } $biblio->items->filter_by_visible_in_opac( { patron => $patron } )->as_list }; |
463 |
my $visible_items = { map { $_->itemnumber => $_ } $biblio->items->filter_by_visible_in_opac( { patron => $patron } )->as_list }; |
467 |
|
464 |
|
468 |
# Only keep the items that are visible in the opac (i.e. those in %visible_items) |
465 |
# Only keep the items that are visible in the opac (i.e. those in %visible_items) |
Lines 525-534
foreach my $biblioNum (@biblionumbers) {
Link Here
|
525 |
$itemLoopIter->{itemnotforloan} = $itemInfo->{itemnotforloan}; |
522 |
$itemLoopIter->{itemnotforloan} = $itemInfo->{itemnotforloan}; |
526 |
|
523 |
|
527 |
# Management of the notforloan document |
524 |
# Management of the notforloan document |
528 |
if ( $itemLoopIter->{notforloan} || $itemLoopIter->{itemnotforloan}) { |
525 |
if ( $itemLoopIter->{notforloan} || $itemLoopIter->{itemnotforloan} ) { |
529 |
$itemLoopIter->{backgroundcolor} = 'other'; |
526 |
$itemLoopIter->{backgroundcolor} = 'other'; |
530 |
$itemLoopIter->{notforloanvalue} = |
527 |
my $notforloan_av = Koha::AuthorisedValues->get_description_by_koha_field( |
531 |
$notforloan_label_of->{ $itemLoopIter->{notforloan} }; |
528 |
{ |
|
|
529 |
frameworkcode => $frameworkcode, |
530 |
kohafield => 'items.notforloan', |
531 |
authorised_value => $itemLoopIter->{notforloan} |
532 |
} |
533 |
); |
534 |
$itemLoopIter->{notforloanvalue} = $notforloan_av->{opac_description} // ''; |
532 |
} |
535 |
} |
533 |
|
536 |
|
534 |
# Management of lost or long overdue items |
537 |
# Management of lost or long overdue items |
535 |
- |
|
|