X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=blobdiff_plain;f=FS%2FFS%2Fcdr.pm;h=d7a4fbdc38b3588f81d72a152d85de04dfe427c2;hp=1e4088162725c71a60eb2971408fb5e3bce1d33d;hb=826bc353426658c25ca7e4d609dadcf6d3a5457c;hpb=aed8ec35ccb9cdeb7ea0cb6ff2946f9d83d582f6 diff --git a/FS/FS/cdr.pm b/FS/FS/cdr.pm index 1e4088162..d7a4fbdc3 100644 --- a/FS/FS/cdr.pm +++ b/FS/FS/cdr.pm @@ -575,11 +575,11 @@ my %export_names = ( }, 'sum_duration' => { 'name' => 'Summary (one line per service, with duration)', - 'invoice_header' => 'Caller,Calls,Minutes,Price', + 'invoice_header' => 'Caller,Rate,Calls,Minutes,Price', }, 'sum_count' => { 'name' => 'Summary (one line per service, with count)', - 'invoice_header' => 'Caller,Messages,Price', + 'invoice_header' => 'Caller,Rate,Messages,Price', }, ); @@ -650,12 +650,14 @@ sub export_formats { # for summary formats, the CDR is a fictitious object containing the # total billsec and the phone number of the service 'src', + sub { my($cdr, %opt) = @_; $opt{ratename} }, sub { my($cdr, %opt) = @_; $opt{count} }, sub { my($cdr, %opt) = @_; int($opt{seconds}/60).'m' }, $price_sub, ], 'sum_count' => [ 'src', + sub { my($cdr, %opt) = @_; $opt{ratename} }, sub { my($cdr, %opt) = @_; $opt{count} }, $price_sub, ], @@ -711,9 +713,13 @@ Options: format -charge +charge - override the 'rated_price' field of the CDR -seconds +seconds - override the 'billsec' field of the CDR + +count - number of usage events included in this record, for summary formats + +ratename - name of the rate table used to rate this call granularity