[Koha-patches] [PATCH] [followup](bug #3950) only show on shelf items

Nahuel ANGELINETTI nahuel.angelinetti at biblibre.com
Wed Jan 13 11:13:06 CET 2010


From: Paul Poulain <paul.poulain at biblibre.com>

This fix pending reserves to show only on shelf items.
---
 C4/Reserves.pm |    9 ++++++++-
 1 files changed, 8 insertions(+), 1 deletions(-)

diff --git a/C4/Reserves.pm b/C4/Reserves.pm
index c1d7b49..5b18333 100644
--- a/C4/Reserves.pm
+++ b/C4/Reserves.pm
@@ -258,7 +258,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;
@@ -753,6 +757,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.
-- 
1.5.6.5




More information about the Koha-patches mailing list