diff options
author | ivan <ivan> | 2011-10-24 21:21:05 +0000 |
---|---|---|
committer | ivan <ivan> | 2011-10-24 21:21:05 +0000 |
commit | 9792616eca51979fbc18cfff9b3d2f5360af8d0e (patch) | |
tree | 5c73335fa8caf0924066d60cf28bac2971156f09 | |
parent | b79a8cb932946c849328a3c117c35821d9d21e66 (diff) |
fix display of duration on inbound packages with use_duraiton, RT#14370
-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 ec7dad6bd..e3af5aaf5 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, [ 'C', $call_details[0], |