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

(-)a/C4/Circulation.pm (-5 / +5 lines)
Lines 2060-2066 sub AddReturn { Link Here
2060
    # fix up the overdues in accounts...
2060
    # fix up the overdues in accounts...
2061
    if ($borrowernumber) {
2061
    if ($borrowernumber) {
2062
        my $fix = _FixOverduesOnReturn( $borrowernumber, $item->itemnumber, $exemptfine, 'RETURNED' );
2062
        my $fix = _FixOverduesOnReturn( $borrowernumber, $item->itemnumber, $exemptfine, 'RETURNED' );
2063
        defined($fix) or warn "_FixOverduesOnReturn($borrowernumber, $item->itemnumber...) failed!";  # zero is OK, check defined
2063
        defined($fix) or warn "_FixOverduesOnReturn($borrowernumber, ".$item->itemnumber."...) failed!";  # zero is OK, check defined
2064
2064
2065
        if ( $issue and $issue->is_overdue($return_date) ) {
2065
        if ( $issue and $issue->is_overdue($return_date) ) {
2066
        # fix fine days
2066
        # fix fine days
Lines 2460-2474 sub _FixOverduesOnReturn { Link Here
2460
2460
2461
                $credit->apply({ debits => [ $accountline ], offset_type => 'Forgiven' });
2461
                $credit->apply({ debits => [ $accountline ], offset_type => 'Forgiven' });
2462
2462
2463
                $accountline->status('FORGIVEN');
2464
                $accountline->store();
2465
2466
                if (C4::Context->preference("FinesLog")) {
2463
                if (C4::Context->preference("FinesLog")) {
2467
                    &logaction("FINES", 'MODIFY',$borrowernumber,"Overdue forgiven: item $item");
2464
                    &logaction("FINES", 'MODIFY',$borrowernumber,"Overdue forgiven: item $item");
2468
                }
2465
                }
2466
2467
                $accountline->status('FORGIVEN');
2468
                $accountline->store();
2469
            } else {
2469
            } else {
2470
                $accountline->status($status);
2470
                $accountline->status($status);
2471
                $accountline->store();
2471
                $accountline->store();
2472
2472
            }
2473
            }
2473
        }
2474
        }
2474
    );
2475
    );
2475
- 

Return to bug 8338