Lines 564-576
if ( C4::Context->preference('EasyAnalyticalRecords') ) {
Link Here
|
564 |
$analyticfield = '461'; |
564 |
$analyticfield = '461'; |
565 |
} |
565 |
} |
566 |
foreach my $hostfield ($temp->field($analyticfield)){ |
566 |
foreach my $hostfield ($temp->field($analyticfield)){ |
567 |
if ($hostfield->subfield('0')){ |
567 |
my $hostbiblionumber = $hostfield->subfield('0'); |
568 |
my $hostrecord = GetMarcBiblio($hostfield->subfield('0'), 1); |
568 |
if ($hostbiblionumber){ |
569 |
my ($itemfield, undef) = GetMarcFromKohaField( 'items.itemnumber', GetFrameworkCode($hostfield->subfield('0')) ); |
569 |
my $hostrecord = GetMarcBiblio($hostbiblionumber, 1); |
570 |
foreach my $hostitem ($hostrecord->field($itemfield)){ |
570 |
if ($hostrecord) { |
571 |
if ($hostitem->subfield('9') eq $hostfield->subfield('9')){ |
571 |
my ($itemfield, undef) = GetMarcFromKohaField( 'items.itemnumber', GetFrameworkCode($hostbiblionumber) ); |
572 |
push (@fields, $hostitem); |
572 |
foreach my $hostitem ($hostrecord->field($itemfield)){ |
573 |
push (@hostitemnumbers, $hostfield->subfield('9')); |
573 |
if ($hostitem->subfield('9') eq $hostfield->subfield('9')){ |
|
|
574 |
push (@fields, $hostitem); |
575 |
push (@hostitemnumbers, $hostfield->subfield('9')); |
576 |
} |
574 |
} |
577 |
} |
575 |
} |
578 |
} |
576 |
} |
579 |
} |
577 |
- |
|
|