bug 3597: DelItemCheck now refuses to delete items in transit for holds
authorGalen Charlton <gmcharlt@gmail.com>
Fri, 22 Oct 2010 03:01:34 +0000 (23:01 -0400)
committerGalen Charlton <gmcharlt@gmail.com>
Fri, 22 Oct 2010 03:01:34 +0000 (23:01 -0400)
Signed-off-by: Galen Charlton <gmcharlt@gmail.com>
C4/Items.pm

index 794bff7..264fa5b 100644 (file)
@@ -2005,7 +2005,7 @@ sub DelItemCheck {
         $error = "book_on_loan" 
     }else{
         # check it doesnt have a waiting reserve
-        $sth=$dbh->prepare("SELECT * FROM reserves WHERE found = 'W' AND itemnumber = ?");
+        $sth=$dbh->prepare("SELECT * FROM reserves WHERE (found = 'W' or found = 'T') AND itemnumber = ?");
         $sth->execute($itemnumber);
         my $reserve=$sth->fetchrow;
         if ($reserve){