Lines 303-318
for ( my $i = 0; $i < @scanned_items; $i++ ) {
Link Here
|
303 |
my $item = $scanned_items[$i]; |
303 |
my $item = $scanned_items[$i]; |
304 |
|
304 |
|
305 |
$item->{notforloancode} = $item->{notforloan}; # save for later use |
305 |
$item->{notforloancode} = $item->{notforloan}; # save for later use |
306 |
my $fc = $item->{'frameworkcode'} || ''; |
|
|
307 |
|
308 |
# Populating with authorised values description |
309 |
foreach my $field (qw/ location notforloan itemlost damaged withdrawn /) { |
310 |
my $av = Koha::AuthorisedValues->get_description_by_koha_field( |
311 |
{ frameworkcode => $fc, kohafield => "items.$field", authorised_value => $item->{$field} } ); |
312 |
if ( $av and defined $item->{$field} and defined $av->{lib} ) { |
313 |
$item->{$field} = $av->{lib}; |
314 |
} |
315 |
} |
316 |
|
306 |
|
317 |
# If we have scanned items with a non-matching notforloan value |
307 |
# If we have scanned items with a non-matching notforloan value |
318 |
if( none { $item->{'notforloancode'} eq $_ } @notforloans ) { |
308 |
if( none { $item->{'notforloancode'} eq $_ } @notforloans ) { |
Lines 453-458
output_html_with_http_headers $input, $cookie, $template->output;
Link Here
|
453 |
sub additemtoresults { |
443 |
sub additemtoresults { |
454 |
my ( $item, $results ) = @_; |
444 |
my ( $item, $results ) = @_; |
455 |
my $itemno = $item->{itemnumber}; |
445 |
my $itemno = $item->{itemnumber}; |
|
|
446 |
|
447 |
my $fc = $item->{'frameworkcode'} || ''; |
448 |
|
449 |
# Populating with authorised values description |
450 |
foreach my $field (qw/ location notforloan itemlost damaged withdrawn /) { |
451 |
my $av = Koha::AuthorisedValues->get_description_by_koha_field( |
452 |
{ frameworkcode => $fc, kohafield => "items.$field", authorised_value => $item->{$field} } ); |
453 |
if ( $av and defined $item->{$field} and defined $av->{lib} ) { |
454 |
$item->{$field} = $av->{lib}; |
455 |
} |
456 |
} |
457 |
|
456 |
# since the script appends to $item, we can just overwrite the hash entry |
458 |
# since the script appends to $item, we can just overwrite the hash entry |
457 |
$results->{$itemno} = $item; |
459 |
$results->{$itemno} = $item; |
458 |
} |
460 |
} |
459 |
- |
|
|