From 7a4f725c8b9e8cc7e2b47cb1fe42f972119292db Mon Sep 17 00:00:00 2001 From: Chris Cormack Date: Mon, 14 Dec 2009 14:07:21 +1300 Subject: [PATCH] Fixing bug with CanBookBeReserved ... rules for default borrower codes were being ignored --- C4/Reserves.pm | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/C4/Reserves.pm b/C4/Reserves.pm index 031ca32358..d98b838ed4 100644 --- a/C4/Reserves.pm +++ b/C4/Reserves.pm @@ -352,7 +352,7 @@ sub CanBookBeReserved{ my @args; my $rightsquery = "SELECT categorycode, itemtype, branchcode, reservesallowed FROM issuingrules - WHERE categorycode = ?"; + WHERE categorycode IN (?, '*')"; push @args,$borrower->{categorycode}; if($controlbranch eq "ItemHomeLibrary"){ @@ -370,7 +370,6 @@ sub CanBookBeReserved{ } $rightsquery .= " ORDER BY categorycode DESC, itemtype DESC, branchcode DESC"; - my $sthrights = $dbh->prepare($rightsquery); $sthrights->execute(@args); @@ -405,7 +404,6 @@ sub CanBookBeReserved{ if(my $row = $sthcount->fetchrow_hashref()){ $reservescount = $row->{count}; } - if($reservescount < $reservesrights){ return 1; }else{ -- 2.39.5