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

(-)a/C4/Circulation.pm (-3 / +2 lines)
Lines 2041-2054 sub AddReturn { Link Here
2041
2041
2042
    my $item_was_lost = $item->itemlost;
2042
    my $item_was_lost = $item->itemlost;
2043
    my $leave_item_lost = C4::Context->preference("BlockReturnOfLostItems") ? 1 : 0;
2043
    my $leave_item_lost = C4::Context->preference("BlockReturnOfLostItems") ? 1 : 0;
2044
    ModDateLastSeen( $item->itemnumber, $leave_item_lost ); # will unset itemlost if needed
2044
    my $updated_item = ModDateLastSeen( $item->itemnumber, $leave_item_lost ); # will unset itemlost if needed
2045
2045
2046
    # fix up the accounts.....
2046
    # fix up the accounts.....
2047
    if ( $item_was_lost ) {
2047
    if ( $item_was_lost ) {
2048
        $messages->{'WasLost'} = 1;
2048
        $messages->{'WasLost'} = 1;
2049
        unless ( C4::Context->preference("BlockReturnOfLostItems") ) {
2049
        unless ( C4::Context->preference("BlockReturnOfLostItems") ) {
2050
            #my $refunded = Koha::Account::Lines->search{(itemnumber => $item->itemnumber, type => 'LOST_FOUND', # FIXME which other parameters to know it has been refunded?
2050
            $messages->{'LostItemFeeRefunded'} = $updated_item->{_refunded};
2051
            $messages->{'LostItemFeeRefunded'} = 1;
2052
        }
2051
        }
2053
    }
2052
    }
2054
2053
(-)a/Koha/Item.pm (-1 / +1 lines)
Lines 870-875 sub _set_found_trigger { Link Here
870
        );
870
        );
871
871
872
        $credit->apply( { debits => [$accountline] } );
872
        $credit->apply( { debits => [$accountline] } );
873
        $self->{_refunded} = 1;
873
    }
874
    }
874
875
875
    # Update the account status
876
    # Update the account status
876
- 

Return to bug 18501