adding collection-code description lookup.
authorMason James <mason@snaga.liblime.co.nz>
Thu, 13 Dec 2007 23:40:17 +0000 (12:40 +1300)
committerJoshua Ferraro <jmf@liblime.com>
Sat, 15 Dec 2007 05:06:31 +0000 (23:06 -0600)
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
opac/opac-detail.pl

index 7aa80f3..46e257b 100755 (executable)
@@ -22,6 +22,7 @@ use strict;
 require Exporter;
 use CGI;
 use C4::Auth;
+use C4::Koha;
 use C4::Serials;    #uses getsubscriptionfrom biblionumber
 use C4::Output;
 use C4::Biblio;
@@ -31,7 +32,6 @@ use C4::Review;
 use C4::Serials;
 use C4::Members;
 
-
 my $query = new CGI;
 my ( $template, $borrowernumber, $cookie ) = get_template_and_user(
     {
@@ -86,7 +86,10 @@ foreach my $itm (@items) {
           || (not $itm->{'itemlost'} )
          || (not $itm->{'itemnotforloan'} )
          || ($itm->{'itemnumber'} ) );
-     $itm->{ $itm->{'publictype'} } = 1;
+        $itm->{ $itm->{'publictype'} } = 1;
+
+        #get collection code description, too
+        $itm->{'ccode'}  = GetAuthorisedValueDesc('','',   $itm->{'ccode'} ,'','','CCODE');
 }
 
 $template->param( norequests => $norequests, RequestOnOpac=>$RequestOnOpac );