Update xml_cdr_inc.php

This commit is contained in:
FusionPBX 2019-02-01 13:35:30 -07:00 committed by GitHub
parent 877fb5197d
commit 5f84af010c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 3 deletions

View File

@ -17,7 +17,7 @@
The Initial Developer of the Original Code is
Mark J Crane <markjcrane@fusionpbx.com>
Portions created by the Initial Developer are Copyright (C) 2008-2018
Portions created by the Initial Developer are Copyright (C) 2008-2019
the Initial Developer. All Rights Reserved.
Contributor(s):
@ -403,13 +403,14 @@
if ($_REQUEST['show'] == "all" && permission_exists('xml_cdr_all')) {
$sql .= ", c.domain_name \n";
}
$sql .= "from v_xml_cdr as c, v_extensions as e \n";
$sql .= "from v_xml_cdr as c \n";
$sql .= "left join v_extensions as e on e.extension_uuid = c.extension_uuid ";
$sql .= "inner join v_domains as d on d.domain_uuid = c.domain_uuid ";
if ($_REQUEST['show'] == "all" && permission_exists('xml_cdr_all')) {
if ($sql_where) { $sql .= "where "; }
} else {
$sql .= "where c.domain_uuid = '".$domain_uuid."' \n";
}
$sql .= "and c.extension_uuid = e.extension_uuid \n";
$sql .= $sql_where;
if (strlen($order_by)> 0) { $sql .= " order by ".$order_by." ".$order." "; }
if ($_REQUEST['export_format'] != "csv" && $_REQUEST['export_format'] != "pdf") {