X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=blobdiff_plain;f=FS%2FFS%2Fpart_pkg%2Fvoip_cdr.pm;h=ada91c66036b939c9edc6e4a29eaca4d97c168b2;hp=81de0bda089b76443067d3bfcdbd0788d2eda1d8;hb=987c70866c7157ccdd592aa9297e8d054a477360;hpb=c7784e7df151dc58da039bc34068ae2e5ae2f21a diff --git a/FS/FS/part_pkg/voip_cdr.pm b/FS/FS/part_pkg/voip_cdr.pm index 81de0bda0..ada91c660 100644 --- a/FS/FS/part_pkg/voip_cdr.pm +++ b/FS/FS/part_pkg/voip_cdr.pm @@ -768,33 +768,33 @@ sub calc_usage { if ( scalar(@call_details) == 1 ) { $call_details = - [ 'C', - $call_details[0], - $charge, - $classnum, - $phonenum, - $cdr->accountcode, - $cdr->startdate, - $seconds, - $regionname, - ]; + { format => 'C', + detail => $call_details[0], + amount => $charge, + classnum => $classnum, + phonenum => $phonenum, + accountcode => $cdr->accountcode, + startdate => $cdr->startdate, + duration => $seconds, + regionname => $regionname, + }; } else { #only used for $rating_method eq 'upstream' now $csv->combine(@call_details); $call_details = - [ 'C', - $csv->string, - $charge, - $classnum, - $phonenum, - $cdr->accountcode, - $cdr->startdate, - $seconds, - $regionname, - ]; + { format => 'C', + detail => $csv->string, + amount => $charge, + classnum => $classnum, + phonenum => $phonenum, + accountcode => $cdr->accountcode, + startdate => $cdr->startdate, + duration => $seconds, + regionname => $regionname, + }; } - warn " adding details on charge to invoice: [ ". - join(', ', @{$call_details} ). " ]" - if ( $DEBUG && ref($call_details) ); + #warn " adding details on charge to invoice: [ ". + # join(', ', @{$call_details} ). " ]" + # if ( $DEBUG && ref($call_details) ); push @invoice_details_sort, [ $call_details, $cdr->calldate_unix ]; } @@ -821,14 +821,9 @@ sub calc_usage { } # $cust_svc - unshift @$details, [ 'C', - FS::cdr::invoice_header($output_format), - '', - '', - '', - '', - '', - ] + unshift @$details, { format => 'C', + detail => FS::cdr::invoice_header($output_format), + } if @$details && $rating_method ne 'upstream'; # if ( $spool_cdr && length($downstream_cdr) ) {