@@ -, +, @@ --- Koha/Exporter/Record.pm | 10 ++++++++++ 1 file changed, 10 insertions(+) --- a/Koha/Exporter/Record.pm +++ a/Koha/Exporter/Record.pm @@ -123,6 +123,16 @@ sub export { Koha::Logger->get->info( $msg ); next; } + # The standard UNIMARC for bibliographic records requires than the + # 9th character (starting from 0) in labels must be blank, but it + # must keep the 'a' value in MARC21 and Koha needs it. Therefore, + # for UNIMARC bibliographic records, it is only corrected for export + my $leader = $record->leader(); + my $marcflavour = C4::Context->preference("marcflavour"); + if ( $marcflavour eq 'UNIMARC' and $record_type eq 'bibs' ) { + substr( $leader, 9, 1 ) = ' '; + $record->leader($leader); + } print $record->as_usmarc(); } } elsif ( $format eq 'xml' ) { --