View | Details | Raw Unified | Return to bug 14048
Collapse All | Expand All

(-)a/C4/Circulation.pm (-14 / +22 lines)
Lines 1438-1450 sub AddIssue { Link Here
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'} ) {
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
                        item_home_branch    => $item->{homebranch},
1446
                 ) ) {
1446
                        item_holding_branch => $item->{holdingbranch}
1447
                _FixAccountForLostAndReturned( $item->{'itemnumber'}, undef, $item->{'barcode'} );
1447
                    }
1448
                )
1449
              )
1450
            {
1451
                _FixAccountForLostAndReturned( $item->{'itemnumber'}, undef,
1452
                    $item->{'barcode'} );
1448
            }
1453
            }
1449
        }
1454
        }
1450
1455
Lines 2117-2128 sub AddReturn { Link Here
2117
        $messages->{'WasLost'} = 1;
2122
        $messages->{'WasLost'} = 1;
2118
2123
2119
        if ( $item->{'itemlost'} ) {
2124
        if ( $item->{'itemlost'} ) {
2120
            if ( Koha::RefundLostItemFeeRules->should_refund(
2125
            if (
2121
                    current_branch => C4::Context->userenv->{ branch },
2126
                Koha::RefundLostItemFeeRules->should_refund(
2122
                    patron_branch  => $borrower->{ branchcode },
2127
                    {
2123
                    item_home_branch => $item->{ homebranch },
2128
                        current_branch      => C4::Context->userenv->{branch},
2124
                    item_holding_branch => $item->{ holdingbranch }
2129
                        item_home_branch    => $item->{homebranch},
2125
                 ) ) {
2130
                        item_holding_branch => $item->{holdingbranch}
2131
                    }
2132
                )
2133
              )
2134
            {
2126
                _FixAccountForLostAndReturned( $item->{'itemnumber'}, $borrowernumber, $barcode );
2135
                _FixAccountForLostAndReturned( $item->{'itemnumber'}, $borrowernumber, $barcode );
2127
                $messages->{'LostItemFeeRefunded'} = 1;
2136
                $messages->{'LostItemFeeRefunded'} = 1;
2128
            }
2137
            }
2129
- 

Return to bug 14048