diff options
author | ivan <ivan> | 2011-10-24 21:20:51 +0000 |
---|---|---|
committer | ivan <ivan> | 2011-10-24 21:20:51 +0000 |
commit | cb6677a63d9f6d617e3cd5b766a5353013290331 (patch) | |
tree | 90fe88bedb1cb950985c6eb33481c7bd49de8725 /FS/FS/part_pkg/voip_inbound.pm | |
parent | 60ad366f6b218de3f229b4ccdc033b96863ea3e9 (diff) |
fix display of duration on inbound packages with use_duraiton, RT#14370
Diffstat (limited to 'FS/FS/part_pkg/voip_inbound.pm')
-rw-r--r-- | FS/FS/part_pkg/voip_inbound.pm | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/FS/FS/part_pkg/voip_inbound.pm b/FS/FS/part_pkg/voip_inbound.pm index 208d9ca..425d86b 100644 --- a/FS/FS/part_pkg/voip_inbound.pm +++ b/FS/FS/part_pkg/voip_inbound.pm @@ -272,12 +272,16 @@ sub calc_usage { if ( $charge > 0 ) { $charges += $charge; - my @call_details = ($cdr->downstream_csv( 'format' => $output_format, - 'charge' => $charge, - 'minutes' => $minutes, - 'granularity' => $granularity, - ) - ); + my @call_details = ( + $cdr->downstream_csv( 'format' => $output_format, + 'charge' => $charge, + 'seconds' => ($use_duration + ? $cdr->duration + : $cdr->billsec + ), + 'granularity' => $granularity, + ) + ); push @$details, { format => 'C', detail => $call_details[0], |