Bug 6840 warning in logs
[koha.git] / catalogue / moredetail.pl
index d285a49..6f6d10d 100755 (executable)
@@ -97,6 +97,18 @@ for my $itm (@all_items) {
                                ($itemnumber != $itm->{itemnumber}));
 }
 
+my $record=GetMarcBiblio($biblionumber);
+
+my $hostrecords;
+# adding items linked via host biblios
+my @hostitems = GetHostItemsInfo($record);
+if (@hostitems){
+        $hostrecords =1;
+        push (@items,@hostitems);
+}
+
+
+
 my $totalcount=@all_items;
 my $showncount=@items;
 my $hiddencount = $totalcount - $showncount;
@@ -121,6 +133,12 @@ foreach my $item (@items){
     $item->{'datelastseen'}            = format_date( $item->{'datelastseen'} );
     $item->{'copyvol'}                 = $item->{'copynumber'};
 
+    # item has a host number if its biblio number does not match the current bib
+    if ($item->{biblionumber} ne $biblionumber){
+        $item->{hostbiblionumber} = $item->{biblionumber};
+        $item->{hosttitle} = GetBiblioData($item->{biblionumber})->{title};
+    }
+
     my $order = GetOrderFromItemnumber( $item->{'itemnumber'} );
     $item->{'ordernumber'}             = $order->{'ordernumber'};
     $item->{'basketno'}                = $order->{'basketno'};