From: Paul Poulain <[email protected]>

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

_______________________________________________
Koha-patches mailing list
[email protected]
http://lists.koha.org/mailman/listinfo/koha-patches

Reply via email to