Lines 467-474
sub import_biblios_list {
Link Here
|
467 |
my @list = (); |
467 |
my @list = (); |
468 |
my $item_error = 0; |
468 |
my $item_error = 0; |
469 |
|
469 |
|
470 |
my $ccodes = GetKohaAuthorisedValues("items.ccode"); |
470 |
my $ccodes = { map { $_->{authorised_value} => $_->{opac_description} } Koha::AuthorisedValues->get_descriptions_by_koha_field( { frameworkcode => '', kohafield => 'items.ccode' } ) }; |
471 |
my $locations = GetKohaAuthorisedValues("items.location"); |
471 |
my $locations = { map { $_->{authorised_value} => $_->{opac_description} } Koha::AuthorisedValues->get_descriptions_by_koha_field( { frameworkcode => '', kohafield => 'items.location' } ) }; |
|
|
472 |
my $notforloans = { map { $_->{authorised_value} => $_->{lib} } Koha::AuthorisedValues->get_descriptions_by_koha_field( { frameworkcode => '', kohafield => 'items.notforloan' } ) }; |
472 |
# location list |
473 |
# location list |
473 |
my @locations; |
474 |
my @locations; |
474 |
foreach (sort keys %$locations) { |
475 |
foreach (sort keys %$locations) { |
Lines 478-484
sub import_biblios_list {
Link Here
|
478 |
foreach (sort {$ccodes->{$a} cmp $ccodes->{$b}} keys %$ccodes) { |
479 |
foreach (sort {$ccodes->{$a} cmp $ccodes->{$b}} keys %$ccodes) { |
479 |
push @ccodes, { code => $_, description => $ccodes->{$_} }; |
480 |
push @ccodes, { code => $_, description => $ccodes->{$_} }; |
480 |
} |
481 |
} |
481 |
|
482 |
my @notforloans; |
|
|
483 |
foreach (sort {$notforloans->{$a} cmp $notforloans->{$b}} keys %$notforloans) { |
484 |
push @notforloans, { code => $_, description => $notforloans->{$_} }; |
485 |
} |
482 |
|
486 |
|
483 |
my $biblio_count = 0; |
487 |
my $biblio_count = 0; |
484 |
foreach my $biblio (@$biblios) { |
488 |
foreach my $biblio (@$biblios) { |
Lines 607-612
sub import_biblios_list {
Link Here
|
607 |
locationloop => \@locations, |
611 |
locationloop => \@locations, |
608 |
itypeloop => \@itypes, |
612 |
itypeloop => \@itypes, |
609 |
ccodeloop => \@ccodes, |
613 |
ccodeloop => \@ccodes, |
|
|
614 |
notforloanloop => \@notforloans, |
610 |
); |
615 |
); |
611 |
batch_info($template, $batch); |
616 |
batch_info($template, $batch); |
612 |
} |
617 |
} |