@@ -, +, @@ being found --- C4/Circulation.pm | 4 +++- C4/Items.pm | 14 ++++++++++---- koha-tmpl/intranet-tmpl/prog/en/modules/circ/returns.tt | 7 ++++++- 3 files changed, 19 insertions(+), 6 deletions(-) --- a/C4/Circulation.pm +++ a/C4/Circulation.pm @@ -1936,7 +1936,9 @@ sub AddReturn { UpdateHoldingbranch($branch, $item->{'itemnumber'}); $item->{'holdingbranch'} = $branch; # update item data holdingbranch too } - ModDateLastSeen( $item->{'itemnumber'} ); + + my $leave_item_lost = C4::Context->preference("BlockReturnOfLostItems") ? 1 : 0; + ModDateLastSeen( $item->{itemnumber}, $leave_item_lost ); # check if we have a transfer for this document my ($datesent,$frombranch,$tobranch) = GetTransfers( $item->{'itemnumber'} ); --- a/C4/Items.pm +++ a/C4/Items.pm @@ -645,18 +645,24 @@ sub ModItemTransfer { =head2 ModDateLastSeen - ModDateLastSeen($itemnum); +ModDateLastSeen( $itemnumber, $leave_item_lost ); Mark item as seen. Is called when an item is issued, returned or manually marked during inventory/stocktaking. -C<$itemnum> is the item number +C<$itemnumber> is the item number +C<$leave_item_lost> determines if a lost item will be found or remain lost =cut sub ModDateLastSeen { - my ($itemnumber) = @_; + my ( $itemnumber, $leave_item_lost ) = @_; my $today = output_pref({ dt => dt_from_string, dateformat => 'iso', dateonly => 1 }); - ModItem( { itemlost => 0, datelastseen => $today }, undef, $itemnumber, { log_action => 0 } ); + + my $params; + $params->{datelastseen} = $today; + $params->{itemlost} = 0 unless $leave_item_lost; + + ModItem( $params, undef, $itemnumber, { log_action => 0 } ); } =head2 DelItem --- a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/returns.tt +++ a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/returns.tt @@ -494,7 +494,12 @@

Local use recorded

[% END %] [% IF ( errmsgloo.waslost ) %] -

Item was lost, now found.

+ [% 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') %]

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

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