AddBiblio
DelBiblio
GetFrameworkCode
- GetMarcBiblio
GetMarcFromKohaField
GetMarcStructure
GetUsedMarcStructure
use Koha::BiblioFrameworks;
use Koha::DateUtils qw( dt_from_string );
+use Koha::Biblios;
use Koha::ItemTypes;
use Koha::Libraries;
}
# now, loop again to add parameter subfield that are not in the MARC::Record
- foreach my $subfield ( keys %{ $tagslib->{$tag} } )
+ foreach my $subfield ( sort( keys %{ $tagslib->{$tag} } ) )
{
next if ( length $subfield != 1 );
next if ( $tagslib->{$tag}->{$subfield}->{tab} ne $tabloop );
}
);
+my $biblio;
if ($biblionumber){
- my $does_bib_exist = Koha::Biblios->find($biblionumber);
- if (!defined $does_bib_exist){
+ $biblio = Koha::Biblios->find($biblionumber);
+ unless ( $biblio ) {
$biblionumber = undef;
$template->param( bib_doesnt_exist => 1 );
}
$biblioitemnumber
);
-if (($biblionumber) && !($breedingid)){
- $record = GetMarcBiblio({ biblionumber => $biblionumber });
+if ( $biblio && !$breedingid ) {
+ $record = $biblio->metadata->record;
}
if ($breedingid) {
( $record, $encoding ) = MARCfindbreeding( $breedingid ) ;