Lines 37-42
use C4::Circulation;
Link Here
|
37 |
use C4::Reports::Guided; #_get_column_defs |
37 |
use C4::Reports::Guided; #_get_column_defs |
38 |
use C4::Charset; |
38 |
use C4::Charset; |
39 |
use Koha::DateUtils; |
39 |
use Koha::DateUtils; |
|
|
40 |
use Koha::AuthorisedValues; |
40 |
use List::MoreUtils qw( none ); |
41 |
use List::MoreUtils qw( none ); |
41 |
|
42 |
|
42 |
|
43 |
|
Lines 309-315
foreach my $item ( @scanned_items ) {
Link Here
|
309 |
my ($f, $sf) = GetMarcFromKohaField("items.$field", $fc); |
310 |
my ($f, $sf) = GetMarcFromKohaField("items.$field", $fc); |
310 |
if ($f and $sf) { |
311 |
if ($f and $sf) { |
311 |
# We replace the code with it's description |
312 |
# We replace the code with it's description |
312 |
my $authvals = C4::Koha::GetKohaAuthorisedValuesFromField($f, $sf, $fc); |
313 |
my $av = Koha::AuthorisedValues->search_by_marc_field({ frameworkcode => $fc, tagfield => $f, tagsubfield => $sf, }); |
|
|
314 |
$av = $av->count ? $av->unblessed : []; |
315 |
my $authvals = { map { ( $_->{authorised_value} => $_->{lib} ) } @$av }; |
313 |
if ($authvals and defined $item->{$field} and defined $authvals->{$item->{$field}}) { |
316 |
if ($authvals and defined $item->{$field} and defined $authvals->{$item->{$field}}) { |
314 |
$item->{$field} = $authvals->{$item->{$field}}; |
317 |
$item->{$field} = $authvals->{$item->{$field}}; |
315 |
} |
318 |
} |
316 |
- |
|
|