finding maxfines items for renew
authorerickson <erickson@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Wed, 6 Sep 2006 18:11:48 +0000 (18:11 +0000)
committererickson <erickson@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Wed, 6 Sep 2006 18:11:48 +0000 (18:11 +0000)
git-svn-id: svn://svn.open-ils.org/ILS/trunk@6003 dcc99617-32d9-48b4-a31d-7c20da2025e4

Open-ILS/src/perlmods/OpenILS/Application/Circ/Circulate.pm

index df1d561..25af8fa 100644 (file)
@@ -1656,6 +1656,16 @@ sub do_renew {
        my $circ = $self->editor->search_action_circulation(
                        { target_copy => $self->copy->id, stop_fines => undef } )->[0];
 
+       if(!$circ) {
+               $circ = $self->editor->search_action_circulation(
+                       { 
+                               target_copy => $self->copy->id, 
+                               stop_fines => OILS_STOP_FINES_MAX_FINES,
+                               checkin_time => undef
+                       } 
+               )->[0];
+       }
+
        return $self->bail_on_events($self->editor->event) unless $circ;
 
        $self->push_events(OpenILS::Event->new('MAX_RENEWALS_REACHED'))