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

(-)a/C4/Overdues.pm (-3 / +4 lines)
Lines 545-551 sub UpdateFine { Link Here
545
    # - accumulate fines for other items
545
    # - accumulate fines for other items
546
    # so we can update $itemnum fine taking in account fine caps
546
    # so we can update $itemnum fine taking in account fine caps
547
    while (my $overdue = $overdues->next) {
547
    while (my $overdue = $overdues->next) {
548
        if ( defined $overdue->issue_id && $overdue->issue_id == $issue_id && $overdue->status eq 'UNRETURNED' ) {
548
        if ( defined $overdue->issue_id && $overdue->issue_id == $issue_id ) {
549
            if ($accountline) {
549
            if ($accountline) {
550
                $debug and warn "Not a unique accountlines record for issue_id $issue_id";
550
                $debug and warn "Not a unique accountlines record for issue_id $issue_id";
551
                #FIXME Should we still count this one in total_amount ??
551
                #FIXME Should we still count this one in total_amount ??
Lines 574-580 sub UpdateFine { Link Here
574
    }
574
    }
575
575
576
    if ( $accountline ) {
576
    if ( $accountline ) {
577
        if ( Koha::Number::Price->new($accountline->amount)->round != Koha::Number::Price->new($amount)->round ) {
577
        # a book may be returned while cronjob/fines.pl is running
578
        if ( ( $accountline->status eq 'UNRETURNED' || ! C4::Context->preference('CalculateFinesOnReturn') )
579
             && Koha::Number::Price->new($accountline->amount)->round != Koha::Number::Price->new($amount)->round ) {
578
            $accountline->adjust(
580
            $accountline->adjust(
579
                {
581
                {
580
                    amount    => $amount,
582
                    amount    => $amount,
581
- 

Return to bug 18855