|
Lines 295-301
sub buildKohaItemsNamespace {
Link Here
|
| 295 |
my $search_params; |
295 |
my $search_params; |
| 296 |
$search_params->{'me.biblionumber'} = $biblionumber; |
296 |
$search_params->{'me.biblionumber'} = $biblionumber; |
| 297 |
$search_params->{'me.itemnumber'} = { not_in => $hidden_items } if $hidden_items; |
297 |
$search_params->{'me.itemnumber'} = { not_in => $hidden_items } if $hidden_items; |
| 298 |
my @items = Koha::Items->search($search_params,{prefetch=>'branchtransfers'}); |
298 |
my @items = Koha::Items->search($search_params,{prefetch=>['branchtransfers','reserves']}); |
| 299 |
|
299 |
|
| 300 |
my $shelflocations = |
300 |
my $shelflocations = |
| 301 |
{ map { $_->{authorised_value} => $_->{opac_description} } Koha::AuthorisedValues->get_descriptions_by_koha_field( { frameworkcode => "", kohafield => 'items.location' } ) }; |
301 |
{ map { $_->{authorised_value} => $_->{opac_description} } Koha::AuthorisedValues->get_descriptions_by_koha_field( { frameworkcode => "", kohafield => 'items.location' } ) }; |
|
Lines 311-318
sub buildKohaItemsNamespace {
Link Here
|
| 311 |
for my $item (@items) { |
311 |
for my $item (@items) { |
| 312 |
my $status; |
312 |
my $status; |
| 313 |
|
313 |
|
| 314 |
my $reservestatus = C4::Reserves::GetReserveStatus( $item->itemnumber ); |
|
|
| 315 |
|
| 316 |
if ( $item->notforloan < 0) { |
314 |
if ( $item->notforloan < 0) { |
| 317 |
$status = "On order"; |
315 |
$status = "On order"; |
| 318 |
} |
316 |
} |
|
Lines 334-340
sub buildKohaItemsNamespace {
Link Here
|
| 334 |
elsif ($item->get_transfer) { |
332 |
elsif ($item->get_transfer) { |
| 335 |
$status = 'In transit'; |
333 |
$status = 'In transit'; |
| 336 |
} |
334 |
} |
| 337 |
elsif (defined $reservestatus && $reservestatus eq "Waiting") { |
335 |
elsif ( $item->holds({found =>'W'}) ) { |
| 338 |
$status = 'Waiting'; |
336 |
$status = 'Waiting'; |
| 339 |
} |
337 |
} |
| 340 |
elsif ($item->has_pending_hold) { |
338 |
elsif ($item->has_pending_hold) { |
| 341 |
- |
|
|