(bug #3950) only show on shelf items
authorPaul Poulain <paul.poulain@biblibre.com>
Wed, 13 Jan 2010 10:11:08 +0000 (11:11 +0100)
committerHenri-Damien LAURENT <henridamien.laurent@biblibre.com>
Fri, 14 May 2010 07:27:44 +0000 (09:27 +0200)
This fix pending reserves to show only on shelf items.

C4/Reserves.pm

index bf9d76d..19f483f 100644 (file)
@@ -262,7 +262,11 @@ sub GetPendingReserves {
                     
             $line->{title}           = $biblio->{title};
             foreach my $item (@items){
-                next if ($indepbranch && $indepbranch ne $item->{holdingbranch});
+                next if ( ($indepbranch && $indepbranch ne $item->{holdingbranch}) 
+                          or $item->{onloan} 
+                          or $item->{notforloan} 
+                          or $item->{itemlost} 
+                          or $item->{count_reserves} eq "Waiting" or $item->{count_reserves} eq "Transit");
                 $line->{count}++;
                 $line->{holdingbranches}->{$item->{holdingbranch}} = 1;
                 $line->{callnumbers}->{$item->{itemcallnumber}} = 1;
@@ -852,6 +856,9 @@ sub CheckReserves {
                 # Found it
                 return ( "Waiting", $res );
             }
+            elsif( $res->{'itemnumber'} == $item && $res->{'found'} eq 'T' ){
+                return ( "Transit", $res );
+            }
             else {
                 # See if this item is more important than what we've got
                 # so far.