@@ -, +, @@ --- Koha/Account.pm | 18 ------------------ Koha/Account/Line.pm | 10 ---------- 2 files changed, 28 deletions(-) --- a/Koha/Account.pm +++ a/Koha/Account.pm @@ -24,7 +24,6 @@ use Data::Dumper; use List::MoreUtils qw( uniq ); use Try::Tiny; -use C4::Circulation qw( ReturnLostItem ); use C4::Letters; use C4::Log qw( logaction ); use C4::Stats qw( UpdateStats ); @@ -114,15 +113,6 @@ sub pay { $fine->amountoutstanding($new_amountoutstanding)->store(); $balance_remaining = $balance_remaining - $amount_to_pay; - # Same logic exists in Koha::Account::Line::apply - if ( $new_amountoutstanding == 0 - && $fine->itemnumber - && $fine->debit_type_code - && ( $fine->debit_type_code eq 'LOST' ) ) - { - C4::Circulation::ReturnLostItem( $self->{patron_id}, $fine->itemnumber ); - } - my $account_offset = Koha::Account::Offset->new( { debit_id => $fine->id, @@ -174,14 +164,6 @@ sub pay { $fine->amountoutstanding( $old_amountoutstanding - $amount_to_pay ); $fine->store(); - if ( $fine->amountoutstanding == 0 - && $fine->itemnumber - && $fine->debit_type_code - && ( $fine->debit_type_code eq 'LOST' ) ) - { - C4::Circulation::ReturnLostItem( $self->{patron_id}, $fine->itemnumber ); - } - my $account_offset = Koha::Account::Offset->new( { debit_id => $fine->id, --- a/Koha/Account/Line.pm +++ a/Koha/Account/Line.pm @@ -482,16 +482,6 @@ sub apply { $self->amountoutstanding( $available_credit * -1 )->store; $debit->amountoutstanding( $owed - $amount_to_cancel )->store; - - # Same logic exists in Koha::Account::pay - if ( $debit->amountoutstanding == 0 - && $debit->itemnumber - && $debit->debit_type_code - && $debit->debit_type_code eq 'LOST' ) - { - C4::Circulation::ReturnLostItem( $self->borrowernumber, $debit->itemnumber ); - } - } }); --