Lines 297-310
Is only used in this module currently.
Link Here
|
297 |
sub buildKohaItemsNamespace { |
297 |
sub buildKohaItemsNamespace { |
298 |
my ($biblionumber, $hidden_items) = @_; |
298 |
my ($biblionumber, $hidden_items) = @_; |
299 |
|
299 |
|
300 |
$hidden_items ||= []; |
300 |
if ( ref $hidden_items eq 'Koha::Items' ) { |
301 |
my @items = Koha::Items->search( |
301 |
$items = $items->search( |
302 |
{ |
302 |
{}, |
303 |
'me.biblionumber' => $biblionumber, |
303 |
{ prefetch => [ 'branchtransfers', 'reserves' ] } |
304 |
'me.itemnumber' => { not_in => $hidden_items } |
304 |
); |
305 |
}, |
305 |
} else { |
306 |
{ prefetch => [ 'branchtransfers', 'reserves' ] } |
306 |
$hidden_items ||= []; |
307 |
); |
307 |
|
|
|
308 |
$items = Koha::Items->search( |
309 |
{ |
310 |
'me.biblionumber' => $biblionumber, |
311 |
'me.itemnumber' => { not_in => $hidden_items } |
312 |
{ prefetch => [ 'branchtransfers', 'reserves' ] } |
313 |
); |
314 |
} |
308 |
|
315 |
|
309 |
my $shelflocations = |
316 |
my $shelflocations = |
310 |
{ map { $_->{authorised_value} => $_->{opac_description} } Koha::AuthorisedValues->get_descriptions_by_koha_field( { frameworkcode => "", kohafield => 'items.location' } ) }; |
317 |
{ map { $_->{authorised_value} => $_->{opac_description} } Koha::AuthorisedValues->get_descriptions_by_koha_field( { frameworkcode => "", kohafield => 'items.location' } ) }; |
Lines 318-324
sub buildKohaItemsNamespace {
Link Here
|
318 |
my %descs = map { $_->{authorised_value} => $_ } Koha::AuthorisedValues->get_descriptions_by_koha_field( { kohafield => 'items.notforloan' } ); |
325 |
my %descs = map { $_->{authorised_value} => $_ } Koha::AuthorisedValues->get_descriptions_by_koha_field( { kohafield => 'items.notforloan' } ); |
319 |
my $ref_status = C4::Context->preference('Reference_NFL_Statuses') || '1|2'; |
326 |
my $ref_status = C4::Context->preference('Reference_NFL_Statuses') || '1|2'; |
320 |
|
327 |
|
321 |
for my $item (@items) { |
328 |
while ( my $item = $items->next ) { |
322 |
my $status; |
329 |
my $status; |
323 |
my $substatus = ''; |
330 |
my $substatus = ''; |
324 |
|
331 |
|