Bugfix 4123 - CanBookBeRenewed fixed.
authorKyle M Hall <kyle.m.hall@gmail.com>
Mon, 1 Mar 2010 16:57:29 +0000 (11:57 -0500)
committerGalen Charlton <gmcharlt@gmail.com>
Fri, 30 Apr 2010 12:08:41 +0000 (08:08 -0400)
In Circulation::CanBookBeRenewed categorycode and itemtype were not being checked for * wildcard
if a specific code was not given.

Signed-off-by: Galen Charlton <gmcharlt@gmail.com>
C4/Circulation.pm

index e3a37fa..d6dbbb3 100644 (file)
@@ -2065,9 +2065,9 @@ sub CanBookBeRenewed {
                    LEFT JOIN biblioitems USING (biblioitemnumber)
                    
                    WHERE
-                    issuingrules.categorycode = borrowers.categorycode
+                    (issuingrules.categorycode = borrowers.categorycode OR issuingrules.categorycode = '*')
                    AND
-                    issuingrules.itemtype = $itype
+                    (issuingrules.itemtype = $itype OR issuingrules.itemtype = '*')
                    AND
                     (issuingrules.branchcode = $controlbranch OR issuingrules.branchcode = '*') 
                    AND