Star2Billing / a2billing

A2Billing is a telecom switch and billing system capable of providing and billing a range of telecom products and services to customers such as calling card products, residential and wholesale VoIP termination, DID resale and callback services.
www.asterisk2billing.org
Other
181 stars 175 forks source link

Bug in the fct_say_rate function of A2Billing class. #152

Closed i-Tom closed 6 years ago

i-Tom commented 6 years ago

Hello, When the fractional part of the variable '$credit_cur' is multiple of 10 (ex. $credit_cur = 0.80000), the number of cents from rate is said erroneously as being 10 times smaller (rate is said as 8 cents).

Changing the line 2199 to:

list($units, $cents) = preg_split('/[.]/', sprintf('%f',$credit_cur));

fix the problem.