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

(-)a/C4/SIP/ILS.pm (-10 / +10 lines)
Lines 219-232 sub checkin { Link Here
219
    if( !$circ->ok && $circ->alert_type && $circ->alert_type == 98 ) { # data corruption
219
    if( !$circ->ok && $circ->alert_type && $circ->alert_type == 98 ) { # data corruption
220
        $circ->screen_msg("Checkin failed: data problem");
220
        $circ->screen_msg("Checkin failed: data problem");
221
        syslog( "LOG_WARNING", "Problem with issue_id in issues and old_issues; check the about page" );
221
        syslog( "LOG_WARNING", "Problem with issue_id in issues and old_issues; check the about page" );
222
    } elsif( !$item->{patron} ) {
223
        if( $checked_in_ok ) { # Mark checkin ok although book not checked out
224
            $circ->ok( 1 );
225
            syslog("LOG_DEBUG", "C4::SIP::ILS::Checkin - using checked_in_ok");
226
        } else {
227
            $circ->screen_msg("Item not checked out");
228
            syslog("LOG_DEBUG", "C4::SIP::ILS::Checkin - item not checked out");
229
        }
230
    } elsif( $circ->ok ) {
222
    } elsif( $circ->ok ) {
231
        $circ->patron( $patron = C4::SIP::ILS::Patron->new( $item->{patron} ) );
223
        $circ->patron( $patron = C4::SIP::ILS::Patron->new( $item->{patron} ) );
232
        delete $item->{patron};
224
        delete $item->{patron};
Lines 236-243 sub checkin { Link Here
236
        # Checkin failed: Wrongbranch or withdrawn?
228
        # Checkin failed: Wrongbranch or withdrawn?
237
        # Bug 10748 with pref BlockReturnOfLostItems adds another case to come
229
        # Bug 10748 with pref BlockReturnOfLostItems adds another case to come
238
        # here: returning a lost item when the pref is set.
230
        # here: returning a lost item when the pref is set.
239
        $circ->screen_msg("Checkin failed");
231
        if( $checked_in_ok && $circ->error_messages->{NotIssued} && scalar keys %{ $circ->error_messages } == 1 ) { # Mark checkin ok although book not checked out
240
        syslog( "LOG_WARNING", "Checkin failed: probably for Wrongbranch or withdrawn" );
232
            $circ->ok( 1 );
233
            syslog("LOG_DEBUG", "C4::SIP::ILS::Checkin - using checked_in_ok");
234
        } elsif ( $circ->error_messages->{NotIssued} ) {
235
            $circ->screen_msg("Item not checked out");
236
            syslog("LOG_DEBUG", "C4::SIP::ILS::Checkin - item not checked out");
237
        } else {
238
            $circ->screen_msg("Checkin failed");
239
            syslog( "LOG_WARNING", "Checkin failed: probably for Wrongbranch or withdrawn" );
240
        }
241
    }
241
    }
242
242
243
    return $circ;
243
    return $circ;
(-)a/C4/SIP/ILS/Transaction/Checkin.pm (-1 / +2 lines)
Lines 29-34 my %fields = ( Link Here
29
    hold_patron_id   => undef,
29
    hold_patron_id   => undef,
30
    hold_patron_name => "",
30
    hold_patron_name => "",
31
    hold             => undef,
31
    hold             => undef,
32
    error_messages   => undef,
32
);
33
);
33
34
34
sub new {
35
sub new {
Lines 66-71 sub do_checkin { Link Here
66
67
67
    $debug and warn "do_checkin() calling AddReturn($barcode, $branch)";
68
    $debug and warn "do_checkin() calling AddReturn($barcode, $branch)";
68
    my ($return, $messages, $issue, $borrower) = AddReturn($barcode, $branch, undef, undef, $return_date);
69
    my ($return, $messages, $issue, $borrower) = AddReturn($barcode, $branch, undef, undef, $return_date);
70
    $self->error_messages($messages);
69
    $self->alert(!$return);
71
    $self->alert(!$return);
70
    # ignoring messages: NotIssued, WasLost, WasTransfered
72
    # ignoring messages: NotIssued, WasLost, WasTransfered
71
73
72
- 

Return to bug 21745