summaryrefslogtreecommitdiff
path: root/FS/FS/svc_phone.pm
diff options
context:
space:
mode:
authorlevinse <levinse>2011-06-21 22:41:43 +0000
committerlevinse <levinse>2011-06-21 22:41:43 +0000
commita9579d4fc556a54ad76b863cdd19abba79f3fc5f (patch)
tree6f3e6802bd5691fe438e704a18c0cae6c4c4eff2 /FS/FS/svc_phone.pm
parent57adda68a7d445553c43eec5cdcb34490d68b522 (diff)
invoice DID summary performance enhancement, RT10886
Diffstat (limited to 'FS/FS/svc_phone.pm')
-rw-r--r--FS/FS/svc_phone.pm3
1 files changed, 2 insertions, 1 deletions
diff --git a/FS/FS/svc_phone.pm b/FS/FS/svc_phone.pm
index 3d02ca4..19bef94 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;