|
Lines 576-584
sub marcrecord2csv {
Link Here
|
| 576 |
# If it is a subfield |
576 |
# If it is a subfield |
| 577 |
my @loop_values; |
577 |
my @loop_values; |
| 578 |
if (defined $tag->{subfieldtag} ) { |
578 |
if (defined $tag->{subfieldtag} ) { |
| 579 |
my $av = Koha::AuthorisedValues->search_by_marc_field({ frameworkcode => $frameworkcode, tagfield => $tag->{fieldtag}, tagsubfield => $tag->{subfieldtag}, }); |
579 |
my $av_description_mapping = Koha::AuthorisedValues->get_descriptions_by_marc_field( |
| 580 |
$av = $av->count ? $av->unblessed : []; |
580 |
{ |
| 581 |
my $av_description_mapping = { map { ( $_->{authorised_value} => $_->{lib} ) } @$av }; |
581 |
frameworkcode => $frameworkcode, tagfield => $tag->{fieldtag}, |
|
|
582 |
tagsubfield => $tag->{subfieldtag}, |
| 583 |
} |
| 584 |
); |
| 582 |
# For each field |
585 |
# For each field |
| 583 |
foreach my $field (@fields) { |
586 |
foreach my $field (@fields) { |
| 584 |
my @subfields = $field->subfield( $tag->{subfieldtag} ); |
587 |
my @subfields = $field->subfield( $tag->{subfieldtag} ); |
|
Lines 589-597
sub marcrecord2csv {
Link Here
|
| 589 |
|
592 |
|
| 590 |
# Or a field |
593 |
# Or a field |
| 591 |
} else { |
594 |
} else { |
| 592 |
my $av = Koha::AuthorisedValues->search_by_marc_field({ frameworkcode => $frameworkcode, tagfield => $tag->{fieldtag}, }); |
595 |
my $authvalues = Koha::AuthorisedValues->get_descriptions_by_marc_field( |
| 593 |
$av = $av->count ? $av->unblessed : []; |
596 |
{ frameworkcode => $frameworkcode, tagfield => $tag->{fieldtag}, } ); |
| 594 |
my $authvalues = { map { ( $_->{authorised_value} => $_->{lib} ) } @$av }; |
|
|
| 595 |
|
597 |
|
| 596 |
foreach my $field ( @fields ) { |
598 |
foreach my $field ( @fields ) { |
| 597 |
my $value; |
599 |
my $value; |