[Koha-patches] [PATCH] Bug 7970 - Holds not working in OPAC

Amit Gupta amit.gupta at osslabs.biz
Tue Apr 17 13:39:22 CEST 2012


To test:
- create circulation rules for branch only for example (Midway branch).
- No need to set default circulation rules.
---
 C4/Reserves.pm |    7 ++++---
 1 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/C4/Reserves.pm b/C4/Reserves.pm
index 930d524..b302362 100644
--- a/C4/Reserves.pm
+++ b/C4/Reserves.pm
@@ -391,14 +391,15 @@ sub GetReservesFromBorrowernumber {
 sub CanBookBeReserved{
     my ($borrowernumber, $biblionumber) = @_;
 
-    my @items = get_itemnumbers_of($biblionumber);
+    my $items = &get_itemnumbers_of($biblionumber);
     #get items linked via host records
     my @hostitems = get_hostitemnumbers_of($biblionumber);
     if (@hostitems){
-	push (@items, at hostitems);
+        push (@hostitems,$items);
     }
 
-    foreach my $item (@items){
+    my %itemhash = %$items;
+        foreach my $item (keys %itemhash) {
         return 1 if CanItemBeReserved($borrowernumber, $item);
     }
     return 0;
-- 
1.6.4.2



More information about the Koha-patches mailing list