From 92dc62a7b43eef626ddf367de894fb94391da52d Mon Sep 17 00:00:00 2001 From: demonspork Date: Sat, 20 Feb 2021 01:02:03 -0600 Subject: [PATCH] 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. --- app/xml_cdr/xml_cdr_export.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/xml_cdr/xml_cdr_export.php b/app/xml_cdr/xml_cdr_export.php index b39ce53d03..96a12d26f7 100644 --- a/app/xml_cdr/xml_cdr_export.php +++ b/app/xml_cdr/xml_cdr_export.php @@ -192,7 +192,7 @@ $data_body[$p] .= ''.format_phone($fields['destination_number']).''; $data_body[$p] .= ''.$fields['start_stamp'].''; $total['tta'] += ($fields['tta'] > 0) ? $fields['tta'] : 0; - $data_body[$p] .= ''.(($fields['tta'] > 0) ? $fields['tta'].'s' : null).''; + $data_body[$p] .= ''.(($fields['tta'] >= 0) ? $fields['tta'].'s' : null).''; $seconds = ($fields['hangup_cause'] == "ORIGINATOR_CANCEL") ? $fields['duration'] : round(($fields['billmsec'] / 1000), 0, PHP_ROUND_HALF_UP); $total['duration'] += $seconds; $data_body[$p] .= ''.gmdate("G:i:s", $seconds).'';