@@ -, +, @@ ReturnOfLostItemBlocked message in returns.pl --- C4/Circulation.pm | 13 ++++++------- circ/returns.pl | 5 ++++- .../prog/en/modules/circ/returns.tt | 16 +++++++--------- 3 files changed, 17 insertions(+), 17 deletions(-) --- a/C4/Circulation.pm +++ a/C4/Circulation.pm @@ -1944,11 +1944,6 @@ sub AddReturn { $doreturn = 0 if C4::Context->preference("BlockReturnOfWithdrawnItems"); } - if ( $item->itemlost and C4::Context->preference("BlockReturnOfLostItems") ) { - $messages->{'ReturnOfLostItemBlocked'}; - $doreturn = 0; - } - # case of a return of document (deal with issues and holdingbranch) if ($doreturn) { my $is_overdue; @@ -2011,8 +2006,12 @@ sub AddReturn { # fix up the accounts..... if ( $item->itemlost ) { - $messages->{'WasLost'} = 1; - unless ( C4::Context->preference("BlockReturnOfLostItems") ) { + if ( C4::Context->preference("BlockReturnOfLostItems") ) { + $messages->{'ReturnOfLostItemBlocked'} = 1; + $doreturn = 0; + } + else { + $messages->{'WasLost'} = 1; if ( Koha::RefundLostItemFeeRules->should_refund( { --- a/circ/returns.pl +++ a/circ/returns.pl @@ -493,7 +493,10 @@ foreach my $code ( keys %$messages ) { } elsif ( $code eq 'WasLost' ) { $err{waslost} = 1; - $exit_required_p = 1 if C4::Context->preference("BlockReturnOfLostItems"); + } + elsif ( $code eq 'ReturnOfLostItemBlocked' ) { + $err{ReturnOfLostItemBlocked} = 1; + $exit_required_p = 1; } elsif ( $code eq 'LostItemFeeRefunded' ) { $template->param( LostItemFeeRefunded => 1 ); --- a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/returns.tt +++ a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/returns.tt @@ -621,20 +621,18 @@

Local use recorded

[% END %] [% IF ( errmsgloo.waslost ) %] - [% IF Koha.Preference('BlockReturnOfLostItems') %] -

Item is lost, cannot be checked in.

- [% ELSE %] -

Item was lost, now found.

- [% END %] - [% IF LostItemFeeRefunded and not Koha.Preference('BlockReturnOfLostItems') %] +

Item was lost, now found.

+ [% IF LostItemFeeRefunded %]

A refund has been applied to the borrowing patron's account.

- [% ELSIF Koha.Preference('BlockReturnOfLostItems') %] -
Cannot check in
-

NOT CHECKED IN

[% ELSE %]

Any lost item fees for this item will remain on the patron's account.

[% END %] [% END %] + [% IF ( errmsgloo.ReturnOfLostItemBlocked ) %] +
Cannot check in
+

NOT CHECKED IN

+

Item is lost.

+ [% END %] [% IF ( errmsgloo.withdrawn ) %] [% IF Koha.Preference('BlockReturnOfWithdrawnItems') %]
Cannot check in
--