View | Details | Raw Unified | Return to bug 23057
Collapse All | Expand All

(-)a/C4/SIP/ILS.pm (-2 / +1 lines)
Lines 206-212 sub checkin { Link Here
206
    $circ->item( $item = C4::SIP::ILS::Item->new($item_id) );
206
    $circ->item( $item = C4::SIP::ILS::Item->new($item_id) );
207
207
208
    if ($item) {
208
    if ($item) {
209
        $circ->do_checkin( $current_loc, $return_date );
209
        $circ->do_checkin( $current_loc, $return_date, $checked_in_ok );
210
    }
210
    }
211
    else {
211
    else {
212
        $circ->alert(1);
212
        $circ->alert(1);
Lines 222-228 sub checkin { Link Here
222
    } elsif( !$item->{patron} ) {
222
    } elsif( !$item->{patron} ) {
223
        if( $checked_in_ok ) { # Mark checkin ok although book not checked out
223
        if( $checked_in_ok ) { # Mark checkin ok although book not checked out
224
            $circ->ok( 1 );
224
            $circ->ok( 1 );
225
            $circ->alert( 0 );
226
            syslog("LOG_DEBUG", "C4::SIP::ILS::Checkin - using checked_in_ok");
225
            syslog("LOG_DEBUG", "C4::SIP::ILS::Checkin - using checked_in_ok");
227
        } else {
226
        } else {
228
            $circ->screen_msg("Item not checked out");
227
            $circ->screen_msg("Item not checked out");
(-)a/C4/SIP/ILS/Transaction/Checkin.pm (-2 / +14 lines)
Lines 47-52 sub do_checkin { Link Here
47
    my $self = shift;
47
    my $self = shift;
48
    my $branch = shift;
48
    my $branch = shift;
49
    my $return_date = shift;
49
    my $return_date = shift;
50
    my $checked_in_ok = shift;
51
50
    if (!$branch) {
52
    if (!$branch) {
51
        $branch = 'SIP2';
53
        $branch = 'SIP2';
52
    }
54
    }
Lines 69-74 sub do_checkin { Link Here
69
    $self->alert(!$return);
71
    $self->alert(!$return);
70
    # ignoring messages: NotIssued, WasLost, WasTransfered
72
    # ignoring messages: NotIssued, WasLost, WasTransfered
71
73
74
    if ( $checked_in_ok ) {
75
        delete $messages->{NotIssued};
76
        delete $messages->{LocalUse};
77
        $return = 1 unless keys %$messages;
78
    }
79
72
    # biblionumber, biblioitemnumber, itemnumber
80
    # biblionumber, biblioitemnumber, itemnumber
73
    # borrowernumber, reservedate, branchcode
81
    # borrowernumber, reservedate, branchcode
74
    # cancellationdate, found, reservenotes, priority, timestamp
82
    # cancellationdate, found, reservenotes, priority, timestamp
Lines 81-86 sub do_checkin { Link Here
81
    if ($messages->{withdrawn}) {
89
    if ($messages->{withdrawn}) {
82
        $self->alert_type('99');
90
        $self->alert_type('99');
83
    }
91
    }
92
    if ($messages->{WasLost}) {
93
        $self->alert_type('99') if C4::Context->preference("BlockReturnOfLostItems");
94
    }
84
    if ($messages->{Wrongbranch}) {
95
    if ($messages->{Wrongbranch}) {
85
        $self->{item}->destination_loc($messages->{Wrongbranch}->{Rightbranch});
96
        $self->{item}->destination_loc($messages->{Wrongbranch}->{Rightbranch});
86
        $self->alert_type('04');            # send to other branch
97
        $self->alert_type('04');            # send to other branch
Lines 117-123 sub do_checkin { Link Here
117
        $self->{item}->hold_patron_id( $messages->{ResFound}->{borrowernumber} );
128
        $self->{item}->hold_patron_id( $messages->{ResFound}->{borrowernumber} );
118
        $self->{item}->destination_loc( $messages->{ResFound}->{branchcode} );
129
        $self->{item}->destination_loc( $messages->{ResFound}->{branchcode} );
119
    }
130
    }
120
    $self->alert(1) if defined $self->alert_type;  # alert_type could be "00", hypothetically
131
132
    $self->alert( !$return || defined $self->alert_type );
133
121
    $self->ok($return);
134
    $self->ok($return);
122
}
135
}
123
136
124
- 

Return to bug 23057