diff options
Diffstat (limited to 'FS/FS/svc_phone.pm')
-rw-r--r-- | FS/FS/svc_phone.pm | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/FS/FS/svc_phone.pm b/FS/FS/svc_phone.pm index 3d02ca4a3..19bef94fc 100644 --- a/FS/FS/svc_phone.pm +++ b/FS/FS/svc_phone.pm @@ -727,7 +727,8 @@ sub get_cdrs { 'table' => 'cdr', 'hashref' => \%hash, 'extra_sql' => $extra_sql, - 'order_by' => "ORDER BY startdate $for_update", + 'order_by' => $options{'billsec_sum'} ? '' : "ORDER BY startdate $for_update", + 'select' => $options{'billsec_sum'} ? 'sum(billsec) as billsec_sum' : '*', } ); @cdrs; |