[Koha-patches] [PATCH] Analytical records: display items belonging to host records in the moredetail page

savitra.sirohi at osslabs.biz savitra.sirohi at osslabs.biz
Tue Nov 16 02:10:31 CET 2010


From: Amit Gupta <amit.gupta at osslabs.biz>

---
 catalogue/moredetail.pl |   17 +++++++++++++++++
 1 files changed, 17 insertions(+), 0 deletions(-)

diff --git a/catalogue/moredetail.pl b/catalogue/moredetail.pl
index d790c41..05a5a60 100755
--- a/catalogue/moredetail.pl
+++ b/catalogue/moredetail.pl
@@ -74,6 +74,23 @@ my $subscriptionsnumber = CountSubscriptionFromBiblionumber($biblionumber);
 my @results;
 my $fw = GetFrameworkCode($biblionumber);
 my @items= GetItemsInfo($biblionumber);
+my $record=GetMarcBiblio($biblionumber);
+
+my $hostrecords;
+# adding items linked via host biblios
+   foreach my $hostfield ( $record->field('773')) {
+        my $hostbiblionumber = $hostfield->subfield("w");
+        my $linkeditemnumber = $hostfield->subfield("o");
+        my @hostitemInfos = GetItemsInfo($hostbiblionumber);
+        foreach my $hostitemInfo (@hostitemInfos){
+                if ($hostitemInfo->{itemnumber} eq $linkeditemnumber){
+                        $hostrecords =1;
+                        push(@items, $hostitemInfo);
+                }
+         }
+    }
+
+
 my $count=@items;
 $data->{'count'}=$count;
 
-- 
1.5.4.5



More information about the Koha-patches mailing list