for ( my $i = 0 ; $i < $total ; $i++ ) {
my %resultsloop;
- my $marcrecord = MARC::File::USMARC::decode( $marcrecords->[$i] );
+ my $marcrecord = C4::Search::new_record_from_zebra( 'biblioserver', $marcrecords->[$i] );
my $biblio = TransformMarcToKoha( C4::Context->dbh, $marcrecord, '' );
#build the hash for the template.