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

(-)a/C4/Circulation.pm (-1 / +3 lines)
Lines 1935-1941 sub AddReturn { Link Here
1935
        UpdateHoldingbranch($branch, $item->{'itemnumber'});
1935
        UpdateHoldingbranch($branch, $item->{'itemnumber'});
1936
        $item->{'holdingbranch'} = $branch; # update item data holdingbranch too
1936
        $item->{'holdingbranch'} = $branch; # update item data holdingbranch too
1937
    }
1937
    }
1938
    ModDateLastSeen( $item->{'itemnumber'} );
1938
1939
    my $leave_item_lost = C4::Context->preference("BlockReturnOfLostItems") ? 1 : 0;
1940
    ModDateLastSeen( $item->{itemnumber}, $leave_item_lost );
1939
1941
1940
    # check if we have a transfer for this document
1942
    # check if we have a transfer for this document
1941
    my ($datesent,$frombranch,$tobranch) = GetTransfers( $item->{'itemnumber'} );
1943
    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 493-499 Link Here
493
                <p class="problem">Local use recorded</p>
493
                <p class="problem">Local use recorded</p>
494
            [% END %]
494
            [% END %]
495
            [% IF ( errmsgloo.waslost ) %]
495
            [% IF ( errmsgloo.waslost ) %]
496
                <p class="problem">Item was lost, now found.</p>
496
                [% IF Koha.Preference('BlockReturnOfLostItems') %]
497
                    <p class="problem">Item is lost, cannot be checked in.</p>
498
                [% ELSE %]
499
                    <p class="problem">Item was lost, now found.</p>
500
                [% END %]
501
497
                [% IF LostItemFeeRefunded and not Koha.Preference('BlockReturnOfLostItems') %]
502
                [% IF LostItemFeeRefunded and not Koha.Preference('BlockReturnOfLostItems') %]
498
                    <p class="problem">A refund has been applied to the borrowing patron's account.</p>
503
                    <p class="problem">A refund has been applied to the borrowing patron's account.</p>
499
                [% ELSIF Koha.Preference('BlockReturnOfLostItems') %]
504
                [% ELSIF Koha.Preference('BlockReturnOfLostItems') %]
500
- 

Return to bug 21231