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

(-)a/C4/SIP/ILS.pm (-2 / +3 lines)
Lines 191-203 sub checkin { Link Here
191
    # It's ok to check it in if it exists, and if it was checked out
191
    # It's ok to check it in if it exists, and if it was checked out
192
    # or it was not checked out but the checked_in_ok flag was set
192
    # or it was not checked out but the checked_in_ok flag was set
193
    $circ->ok( ( $checked_in_ok && $item ) || ( $item && $item->{patron} ) );
193
    $circ->ok( ( $checked_in_ok && $item ) || ( $item && $item->{patron} ) );
194
    syslog("LOG_DEBUG", "C4::SIP::ILS::checkin - using checked_in_ok") if $checked_in_ok;
194
195
195
    if ( !defined( $item->{patron} ) ) {
196
    if ( !defined( $item->{patron} ) ) {
196
        $circ->screen_msg("Item not checked out") unless $checked_in_ok;
197
        $circ->screen_msg("Item not checked out") unless $checked_in_ok;
198
	syslog("LOG_DEBUG", "C4::SIP::ILS::checkin - item not checked out");
197
    }
199
    }
198
    else {
200
    else {
199
        if ( $circ->ok ) {
201
        if ( $circ->ok ) {
200
            $circ->patron( $patron = new ILS::Patron $item->{patron} );
202
            $circ->patron($patron = C4::SIP::ILS::Patron->new( $item->{patron} ));
201
            delete $item->{patron};
203
            delete $item->{patron};
202
            delete $item->{due_date};
204
            delete $item->{due_date};
203
            $patron->{items} = [ grep { $_ ne $item_id } @{ $patron->{items} } ];
205
            $patron->{items} = [ grep { $_ ne $item_id } @{ $patron->{items} } ];
204
- 

Return to bug 13411