# BEGIN TRANSACTION
$circ->item( $item = C4::SIP::ILS::Item->new($item_id) );
+ my $data;
if ($item) {
- $circ->do_checkin( $current_loc, $return_date, $cv_triggers_alert );
+ $data = $circ->do_checkin( $current_loc, $return_date, $cv_triggers_alert );
}
else {
$circ->alert(1);
if( !$circ->ok && $circ->alert_type && $circ->alert_type == 98 ) { # data corruption
$circ->screen_msg("Checkin failed: data problem");
syslog( "LOG_WARNING", "Problem with issue_id in issues and old_issues; check the about page" );
+ } elsif( $data->{messages}->{withdrawn} && !$circ->ok ) {
+ $circ->screen_msg("Item withdrawn, return not allowed");
+ syslog("LOG_DEBUG", "C4::SIP::ILS::Checkin - item withdrawn");
} elsif( !$item->{patron} ) {
if( $checked_in_ok ) { # Mark checkin ok although book not checked out
$circ->ok( 1 );