Lines 544-564
C4::Biblio::EmbedItemsInMarcBiblio($temp, $biblionumber);
Link Here
|
544 |
my @fields = $temp->fields(); |
544 |
my @fields = $temp->fields(); |
545 |
|
545 |
|
546 |
|
546 |
|
547 |
my @hostitemnumbers; |
547 |
if (C4::Context->preference('EasyAnalyticalRecords')) { |
548 |
my $analyticfield = '773'; |
548 |
my @hostitemnumbers; |
549 |
if ($marcflavour eq 'MARC21' || $marcflavour eq 'NORMARC') { |
549 |
my $analyticfield = '773'; |
550 |
$analyticfield = '773'; |
550 |
if ($marcflavour eq 'MARC21' || $marcflavour eq 'NORMARC') { |
551 |
} elsif ($marcflavour eq 'UNIMARC') { |
551 |
$analyticfield = '773'; |
552 |
$analyticfield = '461'; |
552 |
} elsif ($marcflavour eq 'UNIMARC') { |
553 |
} |
553 |
$analyticfield = '461'; |
554 |
foreach my $hostfield ($temp->field($analyticfield)){ |
554 |
} |
555 |
if ($hostfield->subfield('0')){ |
555 |
foreach my $hostfield ($temp->field($analyticfield)){ |
556 |
my $hostrecord = GetMarcBiblio($hostfield->subfield('0'), 1); |
556 |
if ($hostfield->subfield('0')){ |
557 |
my ($itemfield, undef) = GetMarcFromKohaField( 'items.itemnumber', GetFrameworkCode($hostfield->subfield('0')) ); |
557 |
my $hostrecord = GetMarcBiblio($hostfield->subfield('0'), 1); |
558 |
foreach my $hostitem ($hostrecord->field($itemfield)){ |
558 |
my ($itemfield, undef) = GetMarcFromKohaField( 'items.itemnumber', GetFrameworkCode($hostfield->subfield('0')) ); |
559 |
if ($hostitem->subfield('9') eq $hostfield->subfield('9')){ |
559 |
foreach my $hostitem ($hostrecord->field($itemfield)){ |
560 |
push (@fields, $hostitem); |
560 |
if ($hostitem->subfield('9') eq $hostfield->subfield('9')){ |
561 |
push (@hostitemnumbers, $hostfield->subfield('9')); |
561 |
push (@fields, $hostitem); |
|
|
562 |
push (@hostitemnumbers, $hostfield->subfield('9')); |
563 |
} |
562 |
} |
564 |
} |
563 |
} |
565 |
} |
564 |
} |
566 |
} |
565 |
- |
|
|