[open-ils-commits] r14069 - trunk/Open-ILS/src/perlmods/OpenILS/Application/Circ (erickson)

svn at svn.open-ils.org svn at svn.open-ils.org
Mon Sep 21 09:59:04 EDT 2009


Author: erickson
Date: 2009-09-21 09:59:02 -0400 (Mon, 21 Sep 2009)
New Revision: 14069

Modified:
   trunk/Open-ILS/src/perlmods/OpenILS/Application/Circ/Circulate.pm
Log:
if an open circ exists for the same user, go ahead and return the circ, regardless of auto-renew

Modified: trunk/Open-ILS/src/perlmods/OpenILS/Application/Circ/Circulate.pm
===================================================================
--- trunk/Open-ILS/src/perlmods/OpenILS/Application/Circ/Circulate.pm	2009-09-21 13:53:52 UTC (rev 14068)
+++ trunk/Open-ILS/src/perlmods/OpenILS/Application/Circ/Circulate.pm	2009-09-21 13:59:02 UTC (rev 14069)
@@ -800,6 +800,8 @@
             my $payload; # event payload
 
             if($old_circ->usr == $self->patron->id) {
+                
+                $payload = {old_circ => $old_circ};
 
                 # If there is an open circulation on the checkout item and an auto-renew 
                 # interval is defined, inform the caller that they should go 
@@ -816,10 +818,7 @@
                     my $checkout_time = DateTime::Format::ISO8601->new->parse_datetime( clense_ISO8601($old_circ->xact_start) );
 
                     if(DateTime->now > $checkout_time->add(seconds => $intvl_seconds)) {
-                        $payload = {
-                            old_circ => $old_circ,
-                            auto_renew => 1
-                        }
+                        $payload->{auto_renew} = 1;
                     }
                 }
             }



More information about the open-ils-commits mailing list