Bug 25227: Display correct message if item is withdrawn and withdrawn returns are...
authorKyle M Hall <kyle@bywatersolutions.com>
Mon, 27 Apr 2020 11:07:12 +0000 (07:07 -0400)
committerMartin Renvoize <martin.renvoize@ptfs-europe.com>
Wed, 29 Apr 2020 15:13:17 +0000 (16:13 +0100)
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

C4/SIP/ILS.pm

index 94bc154..75d4b2b 100644 (file)
@@ -220,7 +220,7 @@ 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 ) {
+    } elsif ( $data->{messages}->{withdrawn} && !$circ->ok && C4::Context->preference("BlockReturnOfWithdrawnItems") ) {
             $circ->screen_msg("Item withdrawn, return not allowed");
             syslog("LOG_DEBUG", "C4::SIP::ILS::Checkin - item withdrawn");
     } elsif ( $data->{messages}->{WasLost} && !$circ->ok && C4::Context->preference("BlockReturnOfLostItems") ) {