-# $bill_total += foreach map { $_->amount }
-# qsearch('cust_credit_bill', { 'invnum' => $self->invnum } );
- if ( $bill_total > $cust_bill->charged ) {
+ $bill_total += $_ foreach map { $_->amount }
+ qsearch('cust_credit_bill', { 'invnum' => $self->invnum } );
+ if ( sprintf("%.2f", $bill_total) > sprintf("%.2f", $cust_bill->charged) ) {