Bug 3785 - Fixing a bug that was stopping holds if no maximum number was set
authorChris Cormack <chrisc@catalyst.net.nz>
Tue, 15 Dec 2009 23:21:47 +0000 (12:21 +1300)
committerGalen Charlton <gmcharlt@gmail.com>
Fri, 30 Apr 2010 12:19:37 +0000 (08:19 -0400)
Signed-off-by: Galen Charlton <gmcharlt@gmail.com>

C4/ILSDI/Utility.pm

index 31f7fc1..708ba21 100644 (file)
@@ -98,7 +98,7 @@ sub CanBookBeReserved {
         $out = undef;
     }
     my @reserves = GetReservesFromBorrowernumber( $borrower->{'borrowernumber'} );
-    if ( scalar(@reserves) >= $MAXIMUM_NUMBER_OF_RESERVES ) {
+    if ( $MAXIMUM_NUMBER_OF_RESERVES && scalar(@reserves) >= $MAXIMUM_NUMBER_OF_RESERVES ) {
         $out = undef;
     }
     foreach my $res (@reserves) {