koha-cvs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Koha-cvs] koha/C4 Search.pm [dev_week]


From: Joshua Ferraro
Subject: [Koha-cvs] koha/C4 Search.pm [dev_week]
Date: Mon, 04 Dec 2006 04:58:06 +0000

CVSROOT:        /sources/koha
Module name:    koha
Branch:         dev_week
Changes by:     Joshua Ferraro <kados>  06/12/04 04:58:06

Modified files:
        C4             : Search.pm 

Log message:
        fix for bug 1186: 
        Detail page doesn't show authorized value for lost/damaged/notforloan 
statuses
        
        Owen, can you update the template in cvs and close out the bug?

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/koha/C4/Search.pm?cvsroot=koha&only_with_tag=dev_week&r1=1.99.2.11.2.33&r2=1.99.2.11.2.34

Patches:
Index: Search.pm
===================================================================
RCS file: /sources/koha/koha/C4/Search.pm,v
retrieving revision 1.99.2.11.2.33
retrieving revision 1.99.2.11.2.34
diff -u -b -r1.99.2.11.2.33 -r1.99.2.11.2.34
--- Search.pm   21 Nov 2006 15:37:40 -0000      1.99.2.11.2.33
+++ Search.pm   4 Dec 2006 04:58:05 -0000       1.99.2.11.2.34
@@ -40,7 +40,7 @@
 use vars qw($VERSION @ISA @EXPORT @EXPORT_OK %EXPORT_TAGS);
 
 # set the version for version checking
-$VERSION = do { my @v = '$Revision: 1.99.2.11.2.33 $' =~ /\d+/g;
+$VERSION = do { my @v = '$Revision: 1.99.2.11.2.34 $' =~ /\d+/g;
           shift(@v) . "." . join("_", map {sprintf "%03d", $_ } @v); };
 
 =head1 NAME
@@ -1287,7 +1287,8 @@
                        }
                }
                $isth->finish;
-       #get branch information.....
+
+               # get branch information.....
                my $bsth=$dbh->prepare("SELECT * FROM branches WHERE branchcode 
= ?");
                $bsth->execute($data->{'holdingbranch'});
                if (my $bdata=$bsth->fetchrow_hashref){
@@ -1297,6 +1298,7 @@
                $data->{'datelastseen'}=$date;
                $data->{'datedue'}=$datedue;
                $data->{'count_reserves'} = $count_reserves;
+
        # get notforloan complete status if applicable
                my $sthnflstatus = $dbh->prepare('select authorised_value from 
marc_subfield_structure where kohafield="items.notforloan"');
                $sthnflstatus->execute;
@@ -1306,12 +1308,26 @@
                        $sthnflstatus = $dbh->prepare("select lib from 
authorised_values where category=? and authorised_value=?");
                        
$sthnflstatus->execute($authorised_valuecode,$data->{notforloan});
                        my ($lib) = $sthnflstatus->fetchrow;
-               #       warn "lib: $lib from 
$authorised_valuecode,$data->{notforloan}";
-                       $data->{notforloan} = $lib;
+                       #warn "lib: $lib from 
$authorised_valuecode,$data->{notforloan}";
+                       $data->{notforloantext} = $lib;
                }
 
-# my stack procedures
+               # get itemlost auth value if applicable
 
+           $sthnflstatus = $dbh->prepare('select authorised_value from 
marc_subfield_structure where kohafield="items.itemlost"');
+        $sthnflstatus->execute;
+        $authorised_valuecode = $sthnflstatus->fetchrow;
+        if ($authorised_valuecode) {
+            #warn "authorised valuecode: $authorised_valuecode";
+                       warn "itemlost: ".$data->{itemlost};
+            $sthnflstatus = $dbh->prepare("select lib from authorised_values 
where category=? and authorised_value=?");
+            $sthnflstatus->execute($authorised_valuecode,$data->{itemlost});
+            my ($lib) = $sthnflstatus->fetchrow;
+            warn "lib: $lib from $authorised_valuecode,$data->{itemlost}";
+            $data->{itemlosttext} = $lib;
+        }
+
+               # my stack procedures
                my $stackstatus = $dbh->prepare('select authorised_value from 
marc_subfield_structure where kohafield="items.stack"');
                $stackstatus->execute;
                
@@ -1323,6 +1339,7 @@
                        my ($lib) = $stackstatus->fetchrow;
                        $data->{stack} = $lib;
                }
+
                $results[$i]=$data;
                $i++;
        }




reply via email to

[Prev in Thread] Current Thread [Next in Thread]