projects
/
freeside.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
fix bad bug in line item generation RT#10024
[freeside.git]
/
FS
/
FS
/
part_pkg
/
voip_cdr.pm
diff --git
a/FS/FS/part_pkg/voip_cdr.pm
b/FS/FS/part_pkg/voip_cdr.pm
index
c66a3fd
..
71a82aa
100644
(file)
--- a/
FS/FS/part_pkg/voip_cdr.pm
+++ b/
FS/FS/part_pkg/voip_cdr.pm
@@
-17,7
+17,7
@@
use List::Util qw(first min);
@ISA = qw(FS::part_pkg::recur_Common);
@ISA = qw(FS::part_pkg::recur_Common);
-$DEBUG =
1
;
+$DEBUG =
0
;
tie my %cdr_svc_method, 'Tie::IxHash',
'svc_phone.phonenum' => 'Phone numbers (svc_phone.phonenum)',
tie my %cdr_svc_method, 'Tie::IxHash',
'svc_phone.phonenum' => 'Phone numbers (svc_phone.phonenum)',
@@
-95,6
+95,10
@@
tie my %granularity, 'Tie::IxHash', FS::rate_detail::granularities();
'select_label' => 'ratename',
},
'select_label' => 'ratename',
},
+ 'min_included' => { 'name' => 'Minutes included when using "single price per minute" rating method',
+ },
+
+
'min_charge' => { 'name' => 'Charge per minute when using "single price per minute" rating method',
},
'min_charge' => { 'name' => 'Charge per minute when using "single price per minute" rating method',
},
@@
-149,10
+153,10
@@
tie my %granularity, 'Tie::IxHash', FS::rate_detail::granularities();
'use_cdrtypenum' => { 'name' => 'Do not charge for CDRs where the CDR Type is not set to: ',
},
'use_cdrtypenum' => { 'name' => 'Do not charge for CDRs where the CDR Type is not set to: ',
},
- 'skip_dst_prefix' => { 'name' => 'Do not charge for CDRs where the destination number starts with any of these values:',
+ 'skip_dst_prefix' => { 'name' => 'Do not charge for CDRs where the destination number starts with any of these values:
',
},
},
- 'skip_dcontext' => { 'name' => 'Do not charge for CDRs where the dcontext is set to any of these (comma-separated) values:',
+ 'skip_dcontext' => { 'name' => 'Do not charge for CDRs where the dcontext is set to any of these (comma-separated) values:
',
},
'skip_dstchannel_prefix' => { 'name' => 'Do not charge for CDRs where the dstchannel starts with:',
},
'skip_dstchannel_prefix' => { 'name' => 'Do not charge for CDRs where the dstchannel starts with:',
@@
-166,7
+170,7
@@
tie my %granularity, 'Tie::IxHash', FS::rate_detail::granularities();
},
'accountcode_tollfree_ratenum' => {
},
'accountcode_tollfree_ratenum' => {
- 'name' => 'Optional alternate rate plan when accountcode is toll free',
+ 'name' => 'Optional alternate rate plan when accountcode is toll free
:
',
'type' => 'select',
'select_table' => 'rate',
'select_key' => 'ratenum',
'type' => 'select',
'select_table' => 'rate',
'select_key' => 'ratenum',
@@
-182,9
+186,12
@@
tie my %granularity, 'Tie::IxHash', FS::rate_detail::granularities();
'type' => 'checkbox',
},
'type' => 'checkbox',
},
- 'skip_lastapp' => { 'name' => 'Do not charge for CDRs where the lastapp matches this value',
+ 'skip_lastapp' => { 'name' => 'Do not charge for CDRs where the lastapp matches this value
:
',
},
},
+ 'skip_max_callers' => { 'name' => 'Do not charge for CDRs where max_callers is less than or equal to this value: ',
+ },
+
'use_duration' => { 'name' => 'Calculate usage based on the duration field instead of the billsec field',
'type' => 'checkbox',
},
'use_duration' => { 'name' => 'Calculate usage based on the duration field instead of the billsec field',
'type' => 'checkbox',
},
@@
-199,7
+206,7
@@
tie my %granularity, 'Tie::IxHash', FS::rate_detail::granularities();
'default' => 'default', #XXX test
},
'default' => 'default', #XXX test
},
- 'usage_section' => { 'name' => 'Section in which to place usage charges (whether separated or not)',
+ 'usage_section' => { 'name' => 'Section in which to place usage charges (whether separated or not)
:
',
},
'summarize_usage' => { 'name' => 'Include usage summary with recurring charges when usage is in separate section',
},
'summarize_usage' => { 'name' => 'Include usage summary with recurring charges when usage is in separate section',
@@
-262,6
+269,7
@@
tie my %granularity, 'Tie::IxHash', FS::rate_detail::granularities();
skip_dst_length_less
noskip_dst_length_accountcode_tollfree
skip_lastapp
skip_dst_length_less
noskip_dst_length_accountcode_tollfree
skip_lastapp
+ skip_max_callers
use_duration
411_rewrite
output_format usage_mandate summarize_usage usage_section
use_duration
411_rewrite
output_format usage_mandate summarize_usage usage_section
@@
-835,6
+843,7
@@
sub check_chargable {
skip_src_length_more noskip_src_length_accountcode_tollfree
skip_dst_length_less noskip_dst_length_accountcode_tollfree
skip_lastapp
skip_src_length_more noskip_src_length_accountcode_tollfree
skip_dst_length_less noskip_dst_length_accountcode_tollfree
skip_lastapp
+ skip_max_callers
);
foreach my $opt (grep !exists($flags{option_cache}->{$_}), @opt ) {
$flags{option_cache}->{$opt} = $self->option($opt, 1);
);
foreach my $opt (grep !exists($flags{option_cache}->{$_}), @opt ) {
$flags{option_cache}->{$opt} = $self->option($opt, 1);
@@
-903,6
+912,11
@@
sub check_chargable {
}
}
+ return "max_callers <= $opt{skip_max_callers}"
+ if length($opt{'skip_max_callers'})
+ and length($cdr->max_callers)
+ and $cdr->max_callers <= $opt{'skip_max_callers'};
+
#all right then, rate it
'';
}
#all right then, rate it
'';
}