X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=FS%2FFS%2Fpart_pkg%2Fvoip_cdr.pm;h=db0b9e7f63cd8ad6562101857866da68f0569310;hb=87a59b1bdf236765177c27ab18390ef1317cc34c;hp=f23b7a77c4c3e5f06d9c2050df2b5d6cab8edadb;hpb=60540a339512bf608553e5c54ec9bfbb5bc6edbc;p=freeside.git diff --git a/FS/FS/part_pkg/voip_cdr.pm b/FS/FS/part_pkg/voip_cdr.pm index f23b7a77c..db0b9e7f6 100644 --- a/FS/FS/part_pkg/voip_cdr.pm +++ b/FS/FS/part_pkg/voip_cdr.pm @@ -61,6 +61,11 @@ tie my %detail_formats, 'Tie::IxHash', FS::cdr::invoice_formats() ; +tie my %accountcode_tollfree_field, 'Tie::IxHash', + 'dst' => 'Destination (dst)', + 'src' => 'Source (src)', +; + %info = ( 'name' => 'VoIP rating by plan of CDR records in an internal (or external) SQL table', 'shortname' => 'VoIP/telco CDR rating (standard)', @@ -211,6 +216,12 @@ tie my %detail_formats, 'Tie::IxHash', 'empty_label' => '', }, + 'accountcode_tollfree_field' => { + 'name' => 'When using an alternate rate plan for toll-free accountcodes, the CDR field to use in rating calculations', + 'type' => 'select', + 'select_options' => \%accountcode_tollfree_field, + }, + 'skip_dst_length_less' => { 'name' => 'Do not charge for CDRs where the destination is less than this many digits:', }, @@ -330,7 +341,7 @@ tie my %detail_formats, 'Tie::IxHash', skip_dcontext skip_dst_prefix skip_dstchannel_prefix skip_src_length_more noskip_src_length_accountcode_tollfree - accountcode_tollfree_ratenum + accountcode_tollfree_ratenum accountcode_tollfree_field skip_dst_length_less noskip_dst_length_accountcode_tollfree skip_lastapp @@ -350,7 +361,7 @@ tie my %detail_formats, 'Tie::IxHash', sub price_info { my $self = shift; - my $str = $self->SUPER::price_info; + my $str = $self->SUPER::price_info(@_); $str .= " plus usage" if $str; $str; }