|
Lines 1437-1450
sub AddIssue {
Link Here
|
| 1437 |
} |
1437 |
} |
| 1438 |
|
1438 |
|
| 1439 |
## If item was lost, it has now been found, reverse any list item charges if necessary. |
1439 |
## If item was lost, it has now been found, reverse any list item charges if necessary. |
| 1440 |
if ( $item->{'itemlost'} ) { |
1440 |
if ( $item->{'itemlost'} && $borrower ) { |
| 1441 |
if ( Koha::RefundLostItemFeeRules->should_refund( |
1441 |
if ( |
| 1442 |
current_branch => C4::Context->userenv->{ branch }, |
1442 |
Koha::RefundLostItemFeeRules->should_refund( |
| 1443 |
patron_branch => $borrower->{ branchcode }, |
1443 |
{ |
| 1444 |
item_home_branch => $item->{ homebranch }, |
1444 |
current_branch => C4::Context->userenv->{branch}, |
| 1445 |
item_holding_branch => $item->{ holdingbranch } |
1445 |
patron_branch => $borrower->{branchcode}, |
| 1446 |
) ) { |
1446 |
item_home_branch => $item->{homebranch}, |
| 1447 |
_FixAccountForLostAndReturned( $item->{'itemnumber'}, undef, $item->{'barcode'} ); |
1447 |
item_holding_branch => $item->{holdingbranch} |
|
|
1448 |
} |
| 1449 |
) |
| 1450 |
) |
| 1451 |
{ |
| 1452 |
_FixAccountForLostAndReturned( $item->{'itemnumber'}, undef, |
| 1453 |
$item->{'barcode'} ); |
| 1448 |
} |
1454 |
} |
| 1449 |
} |
1455 |
} |
| 1450 |
|
1456 |
|
|
Lines 2117-2128
sub AddReturn {
Link Here
|
| 2117 |
$messages->{'WasLost'} = 1; |
2123 |
$messages->{'WasLost'} = 1; |
| 2118 |
|
2124 |
|
| 2119 |
if ( $item->{'itemlost'} ) { |
2125 |
if ( $item->{'itemlost'} ) { |
| 2120 |
if ( Koha::RefundLostItemFeeRules->should_refund( |
2126 |
if ( |
| 2121 |
current_branch => C4::Context->userenv->{ branch }, |
2127 |
Koha::RefundLostItemFeeRules->should_refund( |
| 2122 |
patron_branch => $borrower->{ branchcode }, |
2128 |
{ |
| 2123 |
item_home_branch => $item->{ homebranch }, |
2129 |
current_branch => C4::Context->userenv->{branch}, |
| 2124 |
item_holding_branch => $item->{ holdingbranch } |
2130 |
patron_branch => $borrower->{branchcode}, |
| 2125 |
) ) { |
2131 |
item_home_branch => $item->{homebranch}, |
|
|
2132 |
item_holding_branch => $item->{holdingbranch} |
| 2133 |
} |
| 2134 |
) |
| 2135 |
) |
| 2136 |
{ |
| 2126 |
_FixAccountForLostAndReturned( $item->{'itemnumber'}, $borrowernumber, $barcode ); |
2137 |
_FixAccountForLostAndReturned( $item->{'itemnumber'}, $borrowernumber, $barcode ); |
| 2127 |
$messages->{'LostItemFeeRefunded'} = 1; |
2138 |
$messages->{'LostItemFeeRefunded'} = 1; |
| 2128 |
} |
2139 |
} |
| 2129 |
- |
|
|