Lines 36-41
use C4::Circulation;
Link Here
|
36 |
use C4::Reports::Guided; #_get_column_defs |
36 |
use C4::Reports::Guided; #_get_column_defs |
37 |
use C4::Charset; |
37 |
use C4::Charset; |
38 |
use Koha::DateUtils; |
38 |
use Koha::DateUtils; |
|
|
39 |
use Koha::AuthorisedValues; |
39 |
use List::MoreUtils qw( none ); |
40 |
use List::MoreUtils qw( none ); |
40 |
|
41 |
|
41 |
|
42 |
|
Lines 297-303
foreach my $item ( @scanned_items ) {
Link Here
|
297 |
my ($f, $sf) = GetMarcFromKohaField("items.$field", $fc); |
298 |
my ($f, $sf) = GetMarcFromKohaField("items.$field", $fc); |
298 |
if ($f and $sf) { |
299 |
if ($f and $sf) { |
299 |
# We replace the code with it's description |
300 |
# We replace the code with it's description |
300 |
my $authvals = C4::Koha::GetKohaAuthorisedValuesFromField($f, $sf, $fc); |
301 |
my $av = Koha::AuthorisedValues->search_by_marc_field({ frameworkcode => $fc, tagfield => $f, tagsubfield => $sf, }); |
|
|
302 |
$av = $av->count ? $av->unblessed : []; |
303 |
my $authvals = { map { ( $_->{authorised_value} => $_->{lib} ) } @$av }; |
301 |
if ($authvals and defined $item->{$field} and defined $authvals->{$item->{$field}}) { |
304 |
if ($authvals and defined $item->{$field} and defined $authvals->{$item->{$field}}) { |
302 |
$item->{$field} = $authvals->{$item->{$field}}; |
305 |
$item->{$field} = $authvals->{$item->{$field}}; |
303 |
} |
306 |
} |
304 |
- |
|
|