View | Details | Raw Unified | Return to bug 21231
Collapse All | Expand All

(-)a/C4/Circulation.pm (-1 / +3 lines)
Lines 1936-1942 sub AddReturn { Link Here
1936
        UpdateHoldingbranch($branch, $item->{'itemnumber'});
1936
        UpdateHoldingbranch($branch, $item->{'itemnumber'});
1937
        $item->{'holdingbranch'} = $branch; # update item data holdingbranch too
1937
        $item->{'holdingbranch'} = $branch; # update item data holdingbranch too
1938
    }
1938
    }
1939
    ModDateLastSeen( $item->{'itemnumber'} );
1939
1940
    my $leave_item_lost = C4::Context->preference("BlockReturnOfLostItems") ? 1 : 0;
1941
    ModDateLastSeen( $item->{itemnumber}, $leave_item_lost );
1940
1942
1941
    # check if we have a transfer for this document
1943
    # check if we have a transfer for this document
1942
    my ($datesent,$frombranch,$tobranch) = GetTransfers( $item->{'itemnumber'} );
1944
    my ($datesent,$frombranch,$tobranch) = GetTransfers( $item->{'itemnumber'} );
(-)a/C4/Items.pm (-4 / +10 lines)
Lines 645-662 sub ModItemTransfer { Link Here
645
645
646
=head2 ModDateLastSeen
646
=head2 ModDateLastSeen
647
647
648
  ModDateLastSeen($itemnum);
648
ModDateLastSeen( $itemnumber, $leave_item_lost );
649
649
650
Mark item as seen. Is called when an item is issued, returned or manually marked during inventory/stocktaking.
650
Mark item as seen. Is called when an item is issued, returned or manually marked during inventory/stocktaking.
651
C<$itemnum> is the item number
651
C<$itemnumber> is the item number
652
C<$leave_item_lost> determines if a lost item will be found or remain lost
652
653
653
=cut
654
=cut
654
655
655
sub ModDateLastSeen {
656
sub ModDateLastSeen {
656
    my ($itemnumber) = @_;
657
    my ( $itemnumber, $leave_item_lost ) = @_;
657
658
658
    my $today = output_pref({ dt => dt_from_string, dateformat => 'iso', dateonly => 1 });
659
    my $today = output_pref({ dt => dt_from_string, dateformat => 'iso', dateonly => 1 });
659
    ModItem( { itemlost => 0, datelastseen => $today }, undef, $itemnumber, { log_action => 0 } );
660
661
    my $params;
662
    $params->{datelastseen} = $today;
663
    $params->{itemlost} = 0 unless $leave_item_lost;
664
665
    ModItem( $params, undef, $itemnumber, { log_action => 0 } );
660
}
666
}
661
667
662
=head2 DelItem
668
=head2 DelItem
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/returns.tt (-2 / +6 lines)
Lines 494-500 Link Here
494
                <p class="problem">Local use recorded</p>
494
                <p class="problem">Local use recorded</p>
495
            [% END %]
495
            [% END %]
496
            [% IF ( errmsgloo.waslost ) %]
496
            [% IF ( errmsgloo.waslost ) %]
497
                <p class="problem">Item was lost, now found.</p>
497
                [% IF Koha.Preference('BlockReturnOfLostItems') %]
498
                    <p class="problem">Item is lost, cannot be checked in.</p>
499
                [% ELSE %]
500
                    <p class="problem">Item was lost, now found.</p>
501
                [% END %]
502
498
                [% IF LostItemFeeRefunded and not Koha.Preference('BlockReturnOfLostItems') %]
503
                [% IF LostItemFeeRefunded and not Koha.Preference('BlockReturnOfLostItems') %]
499
                    <p class="problem">A refund has been applied to the borrowing patron's account.</p>
504
                    <p class="problem">A refund has been applied to the borrowing patron's account.</p>
500
                [% ELSIF Koha.Preference('BlockReturnOfLostItems') %]
505
                [% ELSIF Koha.Preference('BlockReturnOfLostItems') %]
501
- 

Return to bug 21231