summaryrefslogtreecommitdiff
path: root/FS/FS/part_pkg
diff options
context:
space:
mode:
authorMark Wells <mark@freeside.biz>2016-08-16 20:56:07 -0700
committerMark Wells <mark@freeside.biz>2016-08-16 20:56:13 -0700
commit13f66d3743bbb7be4fb87854636598aae0934815 (patch)
treedb6c90194afd5a74dca8695a0122ea8539a59535 /FS/FS/part_pkg
parentf10cc704ae52f6d1982e50a4b9a00385a40fa19f (diff)
respect granularity settings for display of inbound call duration, #71715
Diffstat (limited to 'FS/FS/part_pkg')
-rw-r--r--FS/FS/part_pkg/voip_inbound.pm9
1 files changed, 3 insertions, 6 deletions
diff --git a/FS/FS/part_pkg/voip_inbound.pm b/FS/FS/part_pkg/voip_inbound.pm
index 81f2765..e911439 100644
--- a/FS/FS/part_pkg/voip_inbound.pm
+++ b/FS/FS/part_pkg/voip_inbound.pm
@@ -292,10 +292,7 @@ sub calc_usage {
my @call_details = (
$cdr->downstream_csv( 'format' => $output_format,
'charge' => $charge,
- 'seconds' => ($use_duration
- ? $cdr->duration
- : $cdr->billsec
- ),
+ 'seconds' => $seconds,
'granularity' => $granularity,
)
);
@@ -317,10 +314,10 @@ sub calc_usage {
'done',
$charge,
$cust_svc->svcnum,
- 'rated_seconds' => $use_duration ? $cdr->duration : $cdr->billsec,
+ 'rated_seconds' => $seconds,
'rated_granularity' => $granularity,
'rated_classnum' => $cdr->calltypenum,
- 'inbound' => 1,
+ 'inbound' => 1, # to update cdr_termination, not cdr
);
die $error if $error;
$formatter->append($cdr);