X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=FS%2FFS%2Fpart_pkg%2Fvoip_cdr.pm;h=04098a89760a0a8ef77b2e62978f198f1483b05b;hb=db5e7f34b1e17ae6ce8909062537cc2fb98ca30d;hp=84b00e99d57ea381953fe0a1f37a79d51d33920e;hpb=dc2442a29ef550dea824e52f348a45c92b7710b4;p=freeside.git diff --git a/FS/FS/part_pkg/voip_cdr.pm b/FS/FS/part_pkg/voip_cdr.pm index 84b00e99d..04098a897 100644 --- a/FS/FS/part_pkg/voip_cdr.pm +++ b/FS/FS/part_pkg/voip_cdr.pm @@ -51,6 +51,11 @@ tie my %unrateable_opts, 'Tie::IxHash', 2 => 'Flag for later review', ; +tie my %detail_formats, 'Tie::IxHash', + '' => '', + FS::cdr::invoice_formats() +; + %info = ( 'name' => 'VoIP rating by plan of CDR records in an internal (or external) SQL table', 'shortname' => 'VoIP/telco CDR rating (standard)', @@ -211,12 +216,25 @@ tie my %unrateable_opts, 'Tie::IxHash', }, #false laziness w/cdr_termination.pm - 'output_format' => { 'name' => 'CDR invoice display format', + 'output_format' => { 'name' => 'CDR display format for invoices', 'type' => 'select', - 'select_options' => { FS::cdr::invoice_formats() }, + 'select_options' => \%detail_formats, 'default' => 'default', #XXX test }, + 'selfservice_format' => + { 'name' => 'CDR display format for selfservice', + 'type' => 'select', + 'select_options' => \%detail_formats, + 'default' => 'default' + }, + 'selfservice_inbound_format' => + { 'name' => 'Inbound CDR display format for selfservice', + 'type' => 'select', + 'select_options' => \%detail_formats, + 'default' => '' + }, + 'usage_section' => { 'name' => 'Section in which to place usage charges (whether separated or not): ', }, @@ -297,7 +315,9 @@ tie my %unrateable_opts, 'Tie::IxHash', skip_max_callers use_duration 411_rewrite - output_format usage_mandate summarize_usage usage_section + output_format + selfservice_format selfservice_inbound_format + usage_mandate summarize_usage usage_section bill_every_call bill_inactive_svcs count_available_phones suspend_bill ) @@ -481,8 +501,8 @@ sub check_chargable { return "carrierid NOT IN ( ". $self->option_cacheable('use_carrierid'). " )" if $self->option_cacheable('use_carrierid') =~ /\S/ - && !grep { $cdr->carrierid eq $_ } split(/\s*,\s*/, $self->option_cacheable('use_carrierid')) #eq otherwise 0 matches '' - && ! $flags{'da_rewrote'}; + && ! $flags{'da_rewrote'} #why? + && !grep { $cdr->carrierid eq $_ } split(/\s*,\s*/, $self->option_cacheable('use_carrierid')); #eq otherwise 0 matches '' # unlike everything else, use_cdrtypenum is applied in FS::svc_x::get_cdrs. return "cdrtypenum != ". $self->option_cacheable('use_cdrtypenum')