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

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

Return to bug 14048