added repair code to force reshelving of in-transit copies if there
authorerickson <erickson@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Mon, 18 Sep 2006 17:37:56 +0000 (17:37 +0000)
committererickson <erickson@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Mon, 18 Sep 2006 17:37:56 +0000 (17:37 +0000)
is no transit open on the copy

git-svn-id: svn://svn.open-ils.org/ILS/trunk@6133 dcc99617-32d9-48b4-a31d-7c20da2025e4

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

index 1ab03e0..d64f9b8 100644 (file)
@@ -1284,6 +1284,12 @@ sub do_checkin {
                        $self->checkin_flesh_events;
                        return;
                } 
+
+       } elsif( $U->copy_status($self->copy->status)->id == OILS_COPY_STATUS_IN_TRANSIT ) {
+               $logger->warn("circulator: we have a copy ".$self->copy->barcode.
+                       " that is in-transit, but there is no transit.. repairing");
+               $self->reshelve_copy(1);
+               return if $self->bail_out;
        }
 
        if( $self->is_renewal ) {