diff --git a/app/xml_cdr/app_languages.php b/app/xml_cdr/app_languages.php index 8f970f3d64..4accc15726 100644 --- a/app/xml_cdr/app_languages.php +++ b/app/xml_cdr/app_languages.php @@ -113,7 +113,12 @@ $text['label-failed']['en-us'] = "Failed"; $text['label-failed']['es-cl'] = "Fracasado"; $text['label-failed']['pt-pt'] = "Fracassado"; - $text['label-failed']['fr-fr'] = "manqué"; + $text['label-failed']['fr-fr'] = "Manqué"; + + $text['label-price']['en-us'] = "Price"; + $text['label-price']['es-cl'] = "Precio"; + $text['label-price']['pt-pt'] = "Preço"; + $text['label-price']['fr-fr'] = "Prix"; $text['button-statistics']['en-us'] = "Statistics"; $text['button-statistics']['es-cl'] = "Estadísticas"; diff --git a/app/xml_cdr/v_xml_cdr_import.php b/app/xml_cdr/v_xml_cdr_import.php index 7865ab10d7..a3c5cb6b90 100644 --- a/app/xml_cdr/v_xml_cdr_import.php +++ b/app/xml_cdr/v_xml_cdr_import.php @@ -250,7 +250,7 @@ function call_cost($rate, $i1, $i2, $t){ $db2->sql = $sql_user_rate; $db2->result = $db2->execute(); - $lcr_user_rate = (strlen($xml->variables->lcr_user_rate)?$xml->variables->lcr_user_rate:0.01); + $lcr_user_rate = (strlen($xml->variables->lcr_user_rate)?$xml->variables->lcr_user_rate: (check_str(urldecode($xml->variables->call_direction)) == "local"?0.0:0.01)); $lcr_user_first_increment = (strlen($db2->result[0]['connect_increment'])?check_str($db2->result[0]['connect_increment']):60); $lcr_user_second_increment = (strlen($db2->result[0]['talk_increment'])?check_str($db2->result[0]['talk_increment']):60); diff --git a/app/xml_cdr/xml_cdr.php b/app/xml_cdr/xml_cdr.php index db57030b02..5c193dae22 100644 --- a/app/xml_cdr/xml_cdr.php +++ b/app/xml_cdr/xml_cdr.php @@ -22,6 +22,7 @@ Contributor(s): Mark J Crane + Luis Daniel Lucio Quiroz */ require_once "root.php"; require_once "resources/require.php"; @@ -291,6 +292,10 @@ else { echo th_order_by('start_stamp', $text['label-start'], $order_by, $order); //echo th_order_by('end_stamp', 'End', $order_by, $order); echo th_order_by('duration', $text['label-duration'], $order_by, $order); + if (file_exists($_SERVER['DOCUMENT_ROOT'].PROJECT_PATH."/app/billings/app_config.php")){ + // billing collumns + echo "".$text['label-price']."\n"; + } if (permission_exists('xml_cdr_pdd')) { echo th_order_by('pdd_ms', 'PDD', $order_by, $order); } @@ -425,6 +430,10 @@ else { $seconds = ($row['hangup_cause']=="ORIGINATOR_CANCEL") ? $row['duration'] : $row['billsec']; echo " ".gmdate("G:i:s", $seconds)."\n"; + + if (file_exists($_SERVER['DOCUMENT_ROOT'].PROJECT_PATH."/app/billings/app_config.php")){ + echo " ".$row['call_sell']."\n"; + } if (permission_exists("xml_cdr_pdd")) { echo " ".number_format($row['pdd_ms']/1000,2)."s\n"; }