Fix check renewal permissions check
authordjfiander <djfiander>
Fri, 2 Jun 2006 00:51:18 +0000 (00:51 +0000)
committerdjfiander <djfiander>
Fri, 2 Jun 2006 00:51:18 +0000 (00:51 +0000)
ILS.pm

diff --git a/ILS.pm b/ILS.pm
index 864b400..6c1fa18 100644 (file)
--- a/ILS.pm
+++ b/ILS.pm
@@ -332,7 +332,7 @@ sub renew {
        $trans->screen_msg("Invalid patron barcode.");
 
        return $trans;
-    } elsif ($patron->{renew_ok} eq 'N') {
+    } elsif (!$patron->renew_ok) {
        
        $trans->screen_msg("Renewals not allowed.");
 
@@ -377,6 +377,8 @@ sub renew_all {
     $trans = new ILS::Transaction::RenewAll;
     
     $trans->patron($patron = new ILS::Patron $patron_id);
+    syslog("LOG_DEBUG", "ILS::renew_all: patron '%s': renew_ok: %s",
+          $patron->name, $patron->renew_ok);
 
     if (!defined($patron)) {
        $trans->screen_msg("Invalid patron barcode.");