mirror of
https://github.com/fusionpbx/fusionpbx.git
synced 2026-01-06 11:43:50 +00:00
Fix TTA display bug in Export CDR PDF
Same thing as in the xml_cdr.php page display. If the call is answered instantly, less than a second, then the difference is 0s, and the 0s is a visual indicator that the call was answered, it just took less than a second. Calls that didn't get answered have a large negative number stored in the TTA field, 0 is an answered call.
This commit is contained in:
@@ -192,7 +192,7 @@
|
||||
$data_body[$p] .= '<td>'.format_phone($fields['destination_number']).'</td>';
|
||||
$data_body[$p] .= '<td>'.$fields['start_stamp'].'</td>';
|
||||
$total['tta'] += ($fields['tta'] > 0) ? $fields['tta'] : 0;
|
||||
$data_body[$p] .= '<td align="right">'.(($fields['tta'] > 0) ? $fields['tta'].'s' : null).'</td>';
|
||||
$data_body[$p] .= '<td align="right">'.(($fields['tta'] >= 0) ? $fields['tta'].'s' : null).'</td>';
|
||||
$seconds = ($fields['hangup_cause'] == "ORIGINATOR_CANCEL") ? $fields['duration'] : round(($fields['billmsec'] / 1000), 0, PHP_ROUND_HALF_UP);
|
||||
$total['duration'] += $seconds;
|
||||
$data_body[$p] .= '<td align="right">'.gmdate("G:i:s", $seconds).'</td>';
|
||||
|
||||
Reference in New Issue
Block a user