UpdateTotalIssues( $item->{'biblionumber'}, 1 );
}
- ## If item was lost, it has now been found, reverse any list item charges if necessary.
- if ( $item->{'itemlost'} ) {
- if ( Koha::RefundLostItemFeeRules->should_refund(
- current_branch => C4::Context->userenv->{ branch },
- patron_branch => $borrower->{ branchcode },
- item_home_branch => $item->{ homebranch },
- item_holding_branch => $item->{ holdingbranch }
- ) ) {
- _FixAccountForLostAndReturned( $item->{'itemnumber'}, undef, $item->{'barcode'} );
+ ## If item was lost, it has now been found, reverse any list item charges if necessary.
+ if ( $item->{'itemlost'} ) {
+ if (
+ Koha::RefundLostItemFeeRules->should_refund(
+ {
+ current_branch => C4::Context->userenv->{branch},
+ item_home_branch => $item->{homebranch},
+ item_holding_branch => $item->{holdingbranch}
+ }
+ )
+ )
+ {
+ _FixAccountForLostAndReturned( $item->{'itemnumber'}, undef,
+ $item->{'barcode'} );
+ }
}
- }
ModItem(
{
$messages->{'WasLost'} = 1;
if ( $item->{'itemlost'} ) {
- if ( Koha::RefundLostItemFeeRules->should_refund(
- current_branch => C4::Context->userenv->{ branch },
- patron_branch => $borrower->{ branchcode },
- item_home_branch => $item->{ homebranch },
- item_holding_branch => $item->{ holdingbranch }
- ) ) {
+ if (
+ Koha::RefundLostItemFeeRules->should_refund(
+ {
+ current_branch => C4::Context->userenv->{branch},
+ item_home_branch => $item->{homebranch},
+ item_holding_branch => $item->{holdingbranch}
+ }
+ )
+ )
+ {
_FixAccountForLostAndReturned( $item->{'itemnumber'}, $borrowernumber, $barcode );
$messages->{'LostItemFeeRefunded'} = 1;
}