Lines 321-333
sub marc_to_koha_fields {
Link Here
|
321 |
my $sub = $field->{tagsubfield}; |
321 |
my $sub = $field->{tagsubfield}; |
322 |
foreach my $fld ($record->field($tag)) { |
322 |
foreach my $fld ($record->field($tag)) { |
323 |
if( $sub eq '@' || $fld->is_control_field ) { |
323 |
if( $sub eq '@' || $fld->is_control_field ) { |
324 |
push @values, $fld->data if $fld->data; |
324 |
push @values, $fld->data; |
325 |
} else { |
325 |
} else { |
326 |
push @values, grep { $_ } $fld->subfield($sub); |
326 |
push @values, $fld->subfield($sub); |
327 |
} |
327 |
} |
328 |
} |
328 |
} |
329 |
} |
329 |
} |
330 |
$result->{$column} = join(' | ', @values) if (@values); |
330 |
$result->{$column} = scalar(@values) ? join(' | ', @values) : undef; |
331 |
} |
331 |
} |
332 |
return $result; |
332 |
return $result; |
333 |
} |
333 |
} |