Lines 2014-2031
sub searchResults {
Link Here
|
2014 |
my $hostbiblionumber = $hostfield->subfield("0"); |
2014 |
my $hostbiblionumber = $hostfield->subfield("0"); |
2015 |
my $linkeditemnumber = $hostfield->subfield("9"); |
2015 |
my $linkeditemnumber = $hostfield->subfield("9"); |
2016 |
if( $hostbiblionumber ) { |
2016 |
if( $hostbiblionumber ) { |
2017 |
my $hostbiblio = GetMarcBiblio({ |
2017 |
my $linkeditemmarc = C4::Items::GetMarcItem( $hostbiblionumber, $linkeditemnumber ); |
2018 |
biblionumber => $hostbiblionumber, |
2018 |
if ($linkeditemmarc) { |
2019 |
embed_items => 1 }); |
2019 |
my $linkeditemfield = $linkeditemmarc->field($itemtag); |
2020 |
my ($itemfield, undef) = GetMarcFromKohaField( 'items.itemnumber' ); |
2020 |
if ($linkeditemfield) { |
2021 |
if( $hostbiblio ) { |
2021 |
push( @fields, $linkeditemfield ); |
2022 |
my @hostitems = $hostbiblio->field($itemfield); |
|
|
2023 |
foreach my $hostitem (@hostitems){ |
2024 |
if ($hostitem->subfield("9") eq $linkeditemnumber){ |
2025 |
my $linkeditem =$hostitem; |
2026 |
# append linked items if they exist |
2027 |
push @fields, $linkeditem if $linkeditem; |
2028 |
} |
2029 |
} |
2022 |
} |
2030 |
} |
2023 |
} |
2031 |
} |
2024 |
} |
2032 |
- |
|
|