X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=FS%2FFS%2Fcdr.pm;h=3a6b01ba58e1a523dae16460705ba40be543c530;hb=a6fe07e49e3fc12169e801b1ed6874c3a5bd8500;hp=9b707194defa3dcce3af63c9110855ae22929d81;hpb=a5fba19707ec1a01db18fa55862e742170feccdf;p=freeside.git diff --git a/FS/FS/cdr.pm b/FS/FS/cdr.pm index 9b707194d..3a6b01ba5 100644 --- a/FS/FS/cdr.pm +++ b/FS/FS/cdr.pm @@ -152,7 +152,7 @@ following fields are currently supported: =item svcnum - Link to customer service (see L) -=item freesidestatus - NULL, processing-tiered, rated, done +=item freesidestatus - NULL, processing-tiered, rated, done, skipped, no-charge, failed =item freesiderewritestatus - NULL, done, skipped @@ -545,7 +545,7 @@ sub rate_prefix { ); if ( $reason ) { warn "not charging for CDR ($reason)\n" if $DEBUG; - return $self->set_status_and_rated_price( 'rated', + return $self->set_status_and_rated_price( 'skipped', 0, $opt{'svcnum'}, ); @@ -1017,6 +1017,10 @@ my %export_names = ( 'invoice_header' => "Date,Time,Called From,Destination,Duration,Price", #"Date,Time,Name,Called From,Destination,Duration,Price", }, + 'accountcode_simple' => { + 'name' => 'Simple with accountcode', + 'invoice_header' => "Date,Time,Called From,Account,Duration,Price", + }, 'basic' => { 'name' => 'Basic', 'invoice_header' => "Date/Time,Called Number,Min/Sec,Price", @@ -1114,6 +1118,14 @@ sub export_formats { #sub { sprintf('%.3f', shift->upstream_price ) }, #PRICE $price_sub, ], + 'accountcode_simple' => [ + sub { time2str($date_format, shift->calldate_unix ) }, #DATE + sub { time2str('%r', shift->calldate_unix ) }, #TIME + 'src', #called from + 'accountcode', #NUMBER_DIALED + $duration_sub, #DURATION + $price_sub, + ], 'sum_duration' => [ # for summary formats, the CDR is a fictitious object containing the # total billsec and the phone number of the service