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,@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

_______________________________________________
Koha-patches mailing list
[email protected]
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-patches
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/

Reply via email to