[freeside-commits] freeside/FS/FS/part_pkg voip_cdr.pm,1.91,1.92
Ivan,,,
ivan at wavetail.420.am
Tue Jul 13 15:55:09 PDT 2010
Update of /home/cvs/cvsroot/freeside/FS/FS/part_pkg
In directory wavetail.420.am:/tmp/cvs-serv14693/FS/FS/part_pkg
Modified Files:
voip_cdr.pm
Log Message:
Optional alternate rate plan when accountcode is toll free, RT#8084
Index: voip_cdr.pm
===================================================================
RCS file: /home/cvs/cvsroot/freeside/FS/FS/part_pkg/voip_cdr.pm,v
retrieving revision 1.91
retrieving revision 1.92
diff -u -w -d -r1.91 -r1.92
--- voip_cdr.pm 2 Jul 2010 23:36:35 -0000 1.91
+++ voip_cdr.pm 13 Jul 2010 22:55:07 -0000 1.92
@@ -162,6 +162,16 @@
'type' => 'checkbox',
},
+ 'accountcode_tollfree_ratenum' => {
+ 'name' => 'Optional alternate rate plan when accountcode is toll free',
+ 'type' => 'select',
+ 'select_table' => 'rate',
+ 'select_key' => 'ratenum',
+ 'select_label' => 'ratename',
+ 'disable_empty' => 0,
+ 'empty_label' => '',
+ },
+
'skip_dst_length_less' => { 'name' => 'Do not charge for CDRs where the destination is less than this many digits:',
},
@@ -240,6 +250,7 @@
use_disposition_taqua use_carrierid use_cdrtypenum
skip_dcontext skip_dstchannel_prefix
skip_src_length_more noskip_src_length_accountcode_tollfree
+ accountcode_tollfree_ratenum
skip_dst_length_less skip_lastapp
use_duration
411_rewrite
@@ -436,8 +447,12 @@
#asterisks here causes inserting the detail to barf, so:
$pretty_destnum =~ s/\*//g;
- $rate = qsearchs('rate', { 'ratenum' => $ratenum })
- or die "ratenum $ratenum not found!";
+ my $eff_ratenum = $cdr->is_tollfree('accountcode')
+ ? $cust_pkg->part_pkg->option('accountcode_tollfree_ratenum')
+ : '';
+ $eff_ratenum ||= $ratenum;
+ $rate = qsearchs('rate', { 'ratenum' => $eff_ratenum })
+ or die "ratenum $eff_ratenum not found!";
my @ltime = localtime($cdr->startdate);
$weektime = $ltime[0] +
More information about the freeside-commits
mailing list