mirror of
https://github.com/fusionpbx/fusionpbx.git
synced 2025-12-30 00:53:50 +00:00
CDR: Add permission for Account Code inclusion.
This commit is contained in:
@@ -236,6 +236,8 @@
|
||||
$apps[$x]['permissions'][$y]['groups'][] = "superadmin";
|
||||
$y++;
|
||||
$apps[$x]['permissions'][$y]['name'] = "xml_cdr_extension_summary_all";
|
||||
$y++;
|
||||
$apps[$x]['permissions'][$y]['name'] = "xml_cdr_account_code";
|
||||
|
||||
//default settings
|
||||
$y=0;
|
||||
|
||||
@@ -573,6 +573,10 @@
|
||||
echo "<th class='center'>".$text['label-recording']."</th>\n";
|
||||
$col_count++;
|
||||
}
|
||||
if (permission_exists('xml_cdr_account_code')) {
|
||||
echo "<th class='left'>".$text['label-accountcode']."</th>\n";
|
||||
$col_count++;
|
||||
}
|
||||
if (permission_exists('xml_cdr_custom_fields')) {
|
||||
if (isset($_SESSION['cdr']['field']) && is_array($_SESSION['cdr']['field']) && @sizeof($_SESSION['cdr']['field'])) {
|
||||
foreach ($_SESSION['cdr']['field'] as $field) {
|
||||
@@ -834,6 +838,12 @@
|
||||
$content .= " <td> </td>\n";
|
||||
}
|
||||
}
|
||||
//account code
|
||||
if (permission_exists('xml_cdr_account_code')) {
|
||||
$content .= " <td class='middle no-link no-wrap'>";
|
||||
$content .= $row['accountcode'];
|
||||
$content .= " </td>\n";
|
||||
}
|
||||
//custom cdr fields
|
||||
if (permission_exists('xml_cdr_custom_fields')) {
|
||||
if (!empty($_SESSION['cdr']['field']) && is_array($_SESSION['cdr']['field'])) {
|
||||
|
||||
@@ -211,6 +211,10 @@
|
||||
$data_head .= '<td width="9%"><b>'.$text['label-destination'].'</b></td>';
|
||||
$columns++;
|
||||
}
|
||||
if (permission_exists('xml_cdr_account_code')) {
|
||||
$data_head .= '<td width="12%" nowrap="nowrap"><b>'.$text['label-accountcode'].'</b></td>';
|
||||
$columns++;
|
||||
}
|
||||
if (permission_exists('xml_cdr_start')) {
|
||||
$data_head .= '<td width="12%" nowrap="nowrap"><b>'.$text['label-start'].'</b></td>';
|
||||
$columns++;
|
||||
@@ -286,6 +290,9 @@
|
||||
if (permission_exists('xml_cdr_destination')) {
|
||||
$data_body[$p] .= '<td>'.format_phone($fields['destination_number']).'</td>';
|
||||
}
|
||||
if (permission_exists('xml_cdr_account_code')) {
|
||||
$data_body[$p] .= '<td>'.$fields['accountcode'].'</td>';
|
||||
}
|
||||
if (permission_exists('xml_cdr_start')) {
|
||||
$data_body[$p] .= '<td>'.$fields['start_stamp'].'</td>';
|
||||
}
|
||||
|
||||
@@ -280,7 +280,9 @@
|
||||
$sql .= $field.", \n";
|
||||
}
|
||||
}
|
||||
$sql .= "c.accountcode, \n";
|
||||
if (permission_exists('xml_cdr_account_code')) {
|
||||
$sql .= "c.accountcode, \n";
|
||||
}
|
||||
$sql .= "c.answer_stamp, \n";
|
||||
$sql .= "c.status, \n";
|
||||
$sql .= "c.sip_hangup_disposition, \n";
|
||||
@@ -479,7 +481,7 @@
|
||||
$sql .= "and bleg_uuid = :bleg_uuid \n";
|
||||
$parameters['bleg_uuid'] = $bleg_uuid;
|
||||
}
|
||||
if (!empty($accountcode)) {
|
||||
if (permission_exists('xml_cdr_account_code') && !empty($accountcode)) {
|
||||
$sql .= "and c.accountcode = :accountcode \n";
|
||||
$parameters['accountcode'] = $accountcode;
|
||||
}
|
||||
|
||||
@@ -253,10 +253,12 @@
|
||||
echo " <td class='vncell'>".$text['label-bridge_uuid']."</td>";
|
||||
echo " <td class='vtable'><input type='text' class='formfld' name='bleg_uuid' value='".escape($bridge_uuid)."'></td>";
|
||||
echo " </tr>";
|
||||
echo " <tr>";
|
||||
echo " <td class='vncell'>".$text['label-accountcode']."</td>";
|
||||
echo " <td class='vtable'><input type='text' class='formfld' name='accountcode' value='".escape($accountcode)."'></td>";
|
||||
echo " </tr>";
|
||||
if (permission_exists('xml_cdr_account_code')) {
|
||||
echo " <tr>";
|
||||
echo " <td class='vncell'>".$text['label-accountcode']."</td>";
|
||||
echo " <td class='vtable'><input type='text' class='formfld' name='accountcode' value='".escape($accountcode)."'></td>";
|
||||
echo " </tr>";
|
||||
}
|
||||
echo " <tr>";
|
||||
echo " <td class='vncell'>".$text['label-read_codec']."</td>";
|
||||
echo " <td class='vtable'><input type='text' class='formfld' name='read_codec' value='".escape($read_codec)."'></td>";
|
||||
|
||||
Reference in New Issue
Block a user