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

(-)a/C4/Overdues.pm (-3 / +2 lines)
Lines 488-499 sub UpdateFine { Link Here
488
488
489
    if ( my $data = $sth->fetchrow_hashref ) {
489
    if ( my $data = $sth->fetchrow_hashref ) {
490
490
491
		# we're updating an existing fine.  Only modify if we're adding to the charge.
491
		# we're updating an existing fine.  Only modify if amount changed
492
        # Note that in the current implementation, you cannot pay against an accruing fine
492
        # Note that in the current implementation, you cannot pay against an accruing fine
493
        # (i.e. , of accounttype 'FU').  Doing so will break accrual.
493
        # (i.e. , of accounttype 'FU').  Doing so will break accrual.
494
    	if ( $data->{'amount'} != $amount ) {
494
    	if ( $data->{'amount'} != $amount ) {
495
            my $diff = $amount - $data->{'amount'};
495
            my $diff = $amount - $data->{'amount'};
496
            $diff = 0 if ( $data->{amount} > $amount);
496
	    #3341: diff could be positive or negative!
497
            my $out  = $data->{'amountoutstanding'} + $diff;
497
            my $out  = $data->{'amountoutstanding'} + $diff;
498
            my $query = "
498
            my $query = "
499
                UPDATE accountlines
499
                UPDATE accountlines
500
- 

Return to bug 3341