return $e->die_event unless $e->allowed('ABORT_REMOTE_TRANSIT', $e->requestor->ws_ou);
}
- # set the copy status to "Canceled Transit"
- $copy->status( OILS_COPY_STATUS_CANCELED_TRANSIT );
- $copy->editor( $e->requestor->id );
- $copy->edit_date('now');
+ # if the copy status is "In Transit", set the copy status to "Canceled Transit"
+ if( $copy->status == OILS_COPY_STATUS_IN_TRANSIT ) {
+ $copy->status( OILS_COPY_STATUS_CANCELED_TRANSIT );
+ $copy->editor( $e->requestor->id );
+ $copy->edit_date('now');
+ }
my $holdtransit = $e->retrieve_action_hold_transit_copy($transit->id);