added some logging, made copy status correct in hold-transit create
authorerickson <erickson@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Mon, 14 Aug 2006 16:44:58 +0000 (16:44 +0000)
committererickson <erickson@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Mon, 14 Aug 2006 16:44:58 +0000 (16:44 +0000)
git-svn-id: svn://svn.open-ils.org/ILS/trunk@5491 dcc99617-32d9-48b4-a31d-7c20da2025e4

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

index 234253f..63cb83c 100644 (file)
@@ -1296,6 +1296,8 @@ sub checkin_build_copy_transit {
    $transit->source_send_time('now');
    $transit->copy_status( $U->copy_status($copy->status)->id );
 
+       $logger->debug("circulator: setting copy status on transit: ".$transit->copy_status);
+
        return $self->bail_on_events($self->editor->event)
                unless $self->editor->create_action_transit_copy($transit);
 
@@ -1371,10 +1373,13 @@ sub attempt_checkin_hold_capture {
 sub checkin_build_hold_transit {
        my $self = shift;
 
+
    my $copy = $self->copy;
    my $hold = $self->hold;
    my $trans = Fieldmapper::action::hold_transit_copy->new;
 
+       $logger->debug("circulator: building hold transit for ".$copy->barcode);
+
    $trans->hold($hold->id);
    $trans->source($self->editor->requestor->ws_ou);
    $trans->dest($hold->pickup_lib);
@@ -1383,7 +1388,7 @@ sub checkin_build_hold_transit {
 
        # when the copy gets to its destination, it will recover
        # this status - put it onto the holds shelf
-   $trans->copy_status(OILS_COPY_STATUS_IN_TRANSIT);
+   $trans->copy_status(OILS_COPY_STATUS_ON_HOLDS_SHELF);
 
        return $self->bail_on_events($self->editor->event)
                unless $self->editor->create_action_hold_transit_copy($trans);