@@ -, +, @@ --- .../bootstrap/en/modules/sci/sci-main.tt | 2 ++ opac/sci/sci-main.pl | 17 +++++++++++++++-- 2 files changed, 17 insertions(+), 2 deletions(-) --- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/sci/sci-main.tt +++ a/koha-tmpl/opac-tmpl/bootstrap/en/modules/sci/sci-main.tt @@ -14,6 +14,8 @@ (Item is withdrawn and check-in blocked by policy, please see library staff for assistance) [% ELSIF messages.NotIssued %] (The book is not currently on loan, please see library staff for assistance) + [% ELSIF messages.additional_materials %] + (The item cannot be returned at a self service terminal, please see library staff for assistance) [% ELSE %] (There was a problem returning this item, please see library staff for assistance) [% END %] --- a/opac/sci/sci-main.pl +++ a/opac/sci/sci-main.pl @@ -22,6 +22,7 @@ use CGI qw ( -utf8 ); use C4::Auth qw(get_template_and_user checkpw); use C4::Circulation; use C4::Output; +use Koha::Items; use List::MoreUtils qw( uniq ); use Try::Tiny; @@ -65,8 +66,20 @@ if ( $op eq 'check_in' ) { # Return items foreach my $barcode (@barcodes) { try { - my ( $success, $messages, $checkout, $patron ) = - AddReturn( $barcode, $library ); + my ( $success, $messages, $checkout, $patron ); + my $item = Koha::Items->find( { barcode => $barcode } ); + my $human_required = 0; + if ( C4::Context->preference("CircConfirmItemParts") + && defined($item) + && $item->materials ) + { + $human_required = 1; + $success = 0; + $messages->{additional_materials} = 1; + } + + ( $success, $messages, $checkout, $patron ) = + AddReturn( $barcode, $library ) unless $human_required; if ($success) { push @success, { --