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

(-)a/C4/Circulation.pm (-3 / +2 lines)
Lines 2014-2027 sub AddReturn { Link Here
2014
2014
2015
    my $item_was_lost = $item->itemlost;
2015
    my $item_was_lost = $item->itemlost;
2016
    my $leave_item_lost = C4::Context->preference("BlockReturnOfLostItems") ? 1 : 0;
2016
    my $leave_item_lost = C4::Context->preference("BlockReturnOfLostItems") ? 1 : 0;
2017
    ModDateLastSeen( $item->itemnumber, $leave_item_lost ); # will unset itemlost if needed
2017
    my $updated_item = ModDateLastSeen( $item->itemnumber, $leave_item_lost ); # will unset itemlost if needed
2018
2018
2019
    # fix up the accounts.....
2019
    # fix up the accounts.....
2020
    if ( $item_was_lost ) {
2020
    if ( $item_was_lost ) {
2021
        $messages->{'WasLost'} = 1;
2021
        $messages->{'WasLost'} = 1;
2022
        unless ( C4::Context->preference("BlockReturnOfLostItems") ) {
2022
        unless ( C4::Context->preference("BlockReturnOfLostItems") ) {
2023
            #my $refunded = Koha::Account::Lines->search{(itemnumber => $item->itemnumber, type => 'LOST_FOUND', # FIXME which other parameters to know it has been refunded?
2023
            $messages->{'LostItemFeeRefunded'} = $updated_item->{_refunded};
2024
            $messages->{'LostItemFeeRefunded'} = 1;
2025
        }
2024
        }
2026
    }
2025
    }
2027
2026
(-)a/Koha/Item.pm (-1 / +1 lines)
Lines 871-876 sub _set_found_trigger { Link Here
871
        );
871
        );
872
872
873
        $credit->apply( { debits => [$accountline] } );
873
        $credit->apply( { debits => [$accountline] } );
874
        $self->{_refunded} = 1;
874
    }
875
    }
875
876
876
    # Update the account status
877
    # Update the account status
877
- 

Return to bug 18501