Lines 484-497
sub apply {
Link Here
|
484 |
$debit->amountoutstanding( $owed - $amount_to_cancel )->store; |
484 |
$debit->amountoutstanding( $owed - $amount_to_cancel )->store; |
485 |
|
485 |
|
486 |
# Same logic exists in Koha::Account::pay |
486 |
# Same logic exists in Koha::Account::pay |
487 |
if ( $debit->amountoutstanding == 0 |
487 |
if ( |
488 |
&& $debit->itemnumber |
488 |
C4::Context->preference('MarkLostItemsAsReturned') =~ |
|
|
489 |
m|onpayment| |
489 |
&& $debit->debit_type_code |
490 |
&& $debit->debit_type_code |
490 |
&& $debit->debit_type_code eq 'LOST' ) |
491 |
&& $debit->debit_type_code eq 'LOST' |
|
|
492 |
&& $debit->amountoutstanding == 0 |
493 |
&& $debit->itemnumber |
494 |
&& !( |
495 |
$self->credit_type_code eq 'LOST_FOUND' |
496 |
&& $self->itemnumber == $debit->itemnumber |
497 |
) |
498 |
) |
491 |
{ |
499 |
{ |
492 |
C4::Circulation::ReturnLostItem( $self->borrowernumber, $debit->itemnumber ); |
500 |
C4::Circulation::ReturnLostItem( $self->borrowernumber, |
|
|
501 |
$debit->itemnumber ); |
493 |
} |
502 |
} |
494 |
|
|
|
495 |
} |
503 |
} |
496 |
}); |
504 |
}); |
497 |
|
505 |
|
498 |
- |
|
|