Lines 395-407
sub add_biblio_from_import_record {
Link Here
|
395 |
|
395 |
|
396 |
my $marcrecord = $import_record->get_marc_record || die "Couldn't translate MARC information"; |
396 |
my $marcrecord = $import_record->get_marc_record || die "Couldn't translate MARC information"; |
397 |
my $matches = $import_record->get_import_record_matches( { chosen => 1 } ); |
397 |
my $matches = $import_record->get_import_record_matches( { chosen => 1 } ); |
398 |
my $match = $matches->count ? $matches->next : undef; |
398 |
my $match = $matches->count ? $matches->next : undef; |
399 |
my $biblionumber = $match ? $match->candidate_match_id : 0; |
399 |
my $biblionumber = $match ? $match->candidate_match_id : 0; |
|
|
400 |
my $biblio = $biblionumber ? Koha::Biblios->find($biblionumber) : undef; |
400 |
|
401 |
|
401 |
if ($biblionumber) { |
402 |
if ($biblio) { |
402 |
$import_record->status('imported')->store; |
403 |
$import_record->status('imported')->store; |
403 |
if ( $overlay_action eq 'replace' ) { |
404 |
if ( $overlay_action eq 'replace' ) { |
404 |
my $biblio = Koha::Biblios->find($biblionumber); |
|
|
405 |
$import_record->replace( { biblio => $biblio } ); |
405 |
$import_record->replace( { biblio => $biblio } ); |
406 |
} |
406 |
} |
407 |
} else { |
407 |
} else { |
408 |
- |
|
|