From 1baf135c3dc2e69506875cc5bb5fa41c3f10ff31 Mon Sep 17 00:00:00 2001 From: luis daniel lucio quiroz Date: Sat, 6 Dec 2014 15:04:38 +0000 Subject: [PATCH] we do not try to convert rate if price is zero, this will speed up things --- app/xml_cdr/xml_cdr.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/app/xml_cdr/xml_cdr.php b/app/xml_cdr/xml_cdr.php index cdc7ee13c4..9e24feed90 100644 --- a/app/xml_cdr/xml_cdr.php +++ b/app/xml_cdr/xml_cdr.php @@ -529,7 +529,7 @@ else { unset($database->sql); unset($database->result); - $sell_price = $row['call_sell']; + $sell_price = strlen($row['call_sell'])?$row['call_sell']:0; $lcr_direction = (strlen($row['direction'])?$row['direction']:"outbound"); $xml_string = trim($row["xml"]); @@ -567,7 +567,9 @@ else { ); //billed currency unset($database->sql); unset($database->result); - $price = currency_convert($sell_price, $billing_currency, $lcr_currency); + if ($sell_price){ + $price = currency_convert($sell_price, $billing_currency, $lcr_currency); + } echo " ".number_format($price,6)." $billing_currency\n"; } if (permission_exists("xml_cdr_pdd")) {