提交 caff4d8b authored 作者: Mike Jerris's avatar Mike Jerris

Merge pull request #661 in FS/freeswitch from…

Merge pull request #661 in FS/freeswitch from ~ANDEE/freeswitch:bugfix/FS-8424-commit-8f343939 to master

* commit '92ac448c':
  FS-8424 fix for default rounding values
...@@ -457,7 +457,7 @@ static switch_status_t do_billing(switch_core_session_t *session) ...@@ -457,7 +457,7 @@ static switch_status_t do_billing(switch_core_session_t *session)
double lowbal_amt = globals.lowbal_amt; double lowbal_amt = globals.lowbal_amt;
double balance; double balance;
double minimum_charge = 0; double minimum_charge = 0;
double rounding_factor = 1; double rounding_factor = 0;
double excess = 0; double excess = 0;
double rounded_billed = 0; double rounded_billed = 0;
int billsecs = 0; int billsecs = 0;
...@@ -609,7 +609,7 @@ static switch_status_t do_billing(switch_core_session_t *session) ...@@ -609,7 +609,7 @@ static switch_status_t do_billing(switch_core_session_t *session)
/* we're going to make an assumption that final billing is done here. So we'll see how this goes. */ /* we're going to make an assumption that final billing is done here. So we'll see how this goes. */
/* round total billed up as required */ /* round total billed up as required */
rounded_billed = ceilf((float)(nibble_data->total * rounding_factor)) / rounding_factor; rounded_billed = rounding_factor > 0 ? ceilf((float)(nibble_data->total * rounding_factor)) / rounding_factor : nibble_data->total;
if (rounded_billed < minimum_charge) if (rounded_billed < minimum_charge)
{ {
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论