[Koha-patches] [PATCH] (bug #3541) show reserved items as not available

Nahuel ANGELINETTI nahuel.angelinetti at biblibre.com
Thu Aug 20 16:39:12 CEST 2009


---
 C4/Search.pm |    7 +++++--
 1 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/C4/Search.pm b/C4/Search.pm
index 7444e43..158d521 100644
--- a/C4/Search.pm
+++ b/C4/Search.pm
@@ -1403,10 +1403,12 @@ sub searchResults {
             elsif ($item->{$otherbranch}) {	# Last resort
                 $item->{'branchname'} = $branches{$item->{$otherbranch}}; 
             }
-
+            
+            ($item->{'reserved'}) = C4::Reserves::CheckReserves($item->{itemnumber});
+            
 			my $prefix = $item->{$hbranch} . '--' . $item->{location} . $item->{itype} . $item->{itemcallnumber};
 # For each grouping of items (onloan, available, unavailable), we build a key to store relevant info about that item
-            if ( $item->{onloan} ) {
+            if ( $item->{onloan} or $item->{reserved} ) {
                 $onloan_count++;
 				my $key = $prefix . $item->{onloan} . $item->{barcode};
 				$onloan_items->{$key}->{due_date} = format_date($item->{onloan});
@@ -1463,6 +1465,7 @@ sub searchResults {
                     || $item->{itemlost}
                     || $item->{damaged}
                     || $item->{notforloan} 
+                    || $item->{reserved}
                     || ($transfertwhen ne ''))
                 {
                     $wthdrawn_count++        if $item->{wthdrawn};
-- 
1.6.0.4




More information about the Koha-patches mailing list