From: ivan Date: Mon, 24 Oct 2011 21:21:05 +0000 (+0000) Subject: fix display of duration on inbound packages with use_duraiton, RT#14370 X-Git-Tag: freeside_2_3_1~215 X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=commitdiff_plain;h=9792616eca51979fbc18cfff9b3d2f5360af8d0e;hp=b79a8cb932946c849328a3c117c35821d9d21e66 fix display of duration on inbound packages with use_duraiton, RT#14370 --- 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],