diff options
author | ivan <ivan> | 2001-12-16 00:55:53 +0000 |
---|---|---|
committer | ivan <ivan> | 2001-12-16 00:55:53 +0000 |
commit | f1042452ad03c578088c7b43a5e8263770c365c5 (patch) | |
tree | d94f8d12c2d1b2e33a5a9c732a93585ffe1bc304 /FS/FS/cust_bill_pay.pm | |
parent | b63544b9961e09bfc95908f867993f2c44139b42 (diff) |
fix weird rounding error:
total cust_bill_pay.amount 39.9 for paynum 240 greater than cust_pay.paid
39.90
Diffstat (limited to 'FS/FS/cust_bill_pay.pm')
-rw-r--r-- | FS/FS/cust_bill_pay.pm | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/FS/FS/cust_bill_pay.pm b/FS/FS/cust_bill_pay.pm index 5ef82d6..3b95f45 100644 --- a/FS/FS/cust_bill_pay.pm +++ b/FS/FS/cust_bill_pay.pm @@ -95,7 +95,7 @@ sub insert { $pay_total += $_ foreach map { $_->amount } qsearch('cust_bill_pay', { 'paynum' => $self->paynum } ); - if ( $pay_total > $cust_pay->paid ) { + if ( sprintf("%.2f", $pay_total) > sprintf("%.2f", $cust_pay->paid) ) { $dbh->rollback if $oldAutoCommit; return "total cust_bill_pay.amount $pay_total for paynum ". $self->paynum. " greater than cust_pay.paid ". $cust_pay->paid; @@ -195,7 +195,7 @@ sub cust_bill { =head1 VERSION -$Id: cust_bill_pay.pm,v 1.8 2001-09-03 22:07:38 ivan Exp $ +$Id: cust_bill_pay.pm,v 1.9 2001-12-16 00:55:53 ivan Exp $ =head1 BUGS |