@@ -, +, @@ checkin response 1 - Mark an item withdrawn 2 - Set up sip server: https://wiki.koha-community.org/wiki/Koha_SIP2_server_setup 3 - Set 'BlockReturnOfWithdrawnItems' to block 4 - Use the sip_cli_emulator to checkin the withdrawn item 5 - There is no error in the checkin --- C4/SIP/ILS.pm | 6 +++++- C4/SIP/ILS/Transaction/Checkin.pm | 2 ++ 2 files changed, 7 insertions(+), 1 deletion(-) --- a/C4/SIP/ILS.pm +++ a/C4/SIP/ILS.pm @@ -205,8 +205,9 @@ sub checkin { # 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); @@ -219,6 +220,9 @@ sub checkin { 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 ); --- a/C4/SIP/ILS/Transaction/Checkin.pm +++ a/C4/SIP/ILS/Transaction/Checkin.pm @@ -129,6 +129,8 @@ sub do_checkin { } $self->ok($return); + + return { messages => $messages }; } sub resensitize { --