- $charge = sprintf('%.2f', ( $rate_detail->min_charge * $charge_min )
- + 0.00000001 ); #so 1.005 rounds to 1.01
- $charges += $charge;
+ $charge += sprintf('%.2f', ($rate_detail->min_charge * $charge_min)
+ + 0.00000001 ); #so 1.005 rounds to 1.01
+ $charge = sprintf('%.2f', $charge);