## If item was lost, it has now been found, reverse any list item charges if neccessary.
if ( $item->{'itemlost'} ) {
- _FixAccountForLostAndReturned( $item->{'itemnumber'}, undef, $item->{'barcode'} );
+ if ( C4::Context->preference('RefundLostItemFeeOnReturn' ) ) {
+ _FixAccountForLostAndReturned( $item->{'itemnumber'}, undef, $item->{'barcode'} );
+ }
}
ModItem({ issues => $item->{'issues'},
}
# fix up the accounts.....
- if ($item->{'itemlost'}) {
- _FixAccountForLostAndReturned($item->{'itemnumber'}, $borrowernumber, $barcode); # can tolerate undef $borrowernumber
+ if ( $item->{'itemlost'} ) {
$messages->{'WasLost'} = 1;
+
+ if ( C4::Context->preference('RefundLostItemFeeOnReturn' ) ) {
+ _FixAccountForLostAndReturned($item->{'itemnumber'}, $borrowernumber, $barcode); # can tolerate undef $borrowernumber
+ $messages->{'LostItemFeeRefunded'} = 1;
+ }
}
# fix up the overdues in accounts...