From 95357419f8777bacb2a0167c31fdb3db7c3befcd Mon Sep 17 00:00:00 2001 From: erickson Date: Mon, 21 Sep 2009 13:59:02 +0000 Subject: [PATCH] if an open circ exists for the same user, go ahead and return the circ, regardless of auto-renew git-svn-id: svn://svn.open-ils.org/ILS/trunk@14069 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- Open-ILS/src/perlmods/OpenILS/Application/Circ/Circulate.pm | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/Open-ILS/src/perlmods/OpenILS/Application/Circ/Circulate.pm b/Open-ILS/src/perlmods/OpenILS/Application/Circ/Circulate.pm index 96d46e5b7..7119135dd 100644 --- a/Open-ILS/src/perlmods/OpenILS/Application/Circ/Circulate.pm +++ b/Open-ILS/src/perlmods/OpenILS/Application/Circ/Circulate.pm @@ -800,6 +800,8 @@ sub do_copy_checks { 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 @@ sub do_copy_checks { 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; } } } -- 2.11.0