[freeside-commits] freeside/FS/FS/part_pkg voip_cdr.pm, 1.79.2.6, 1.79.2.7
Jeff Finucane,420,,
jeff at wavetail.420.am
Mon Jun 28 15:20:09 PDT 2010
Update of /home/cvs/cvsroot/freeside/FS/FS/part_pkg
In directory wavetail.420.am:/tmp/cvs-serv17553
Modified Files:
Tag: FREESIDE_1_9_BRANCH
voip_cdr.pm
Log Message:
connection charge handling which comports with history of module
Index: voip_cdr.pm
===================================================================
RCS file: /home/cvs/cvsroot/freeside/FS/FS/part_pkg/voip_cdr.pm,v
retrieving revision 1.79.2.6
retrieving revision 1.79.2.7
diff -u -w -d -r1.79.2.6 -r1.79.2.7
--- voip_cdr.pm 28 Jun 2010 20:48:04 -0000 1.79.2.6
+++ voip_cdr.pm 28 Jun 2010 22:20:07 -0000 1.79.2.7
@@ -15,7 +15,7 @@
@ISA = qw(FS::part_pkg::recur_Common);
-$DEBUG = 0;
+$DEBUG = 1;
tie my %rating_method, 'Tie::IxHash',
'prefix' => 'Rate calls by using destination prefix to look up a region and rate according to the internal prefix and rate tables',
@@ -556,16 +556,16 @@
$charge = sprintf('%.2f', $rate_detail->conn_charge);
- if ( $included_min{$regionnum} <= 0 ) {
+ if ( $included_min{$regionnum} < 0 ) {
my $charge_min = 0 - $included_min{$regionnum}; #XXX should preserve
#(display?) this
$included_min{$regionnum} = 0;
$charge += sprintf('%.2f', ($rate_detail->min_charge * $charge_min)
+ 0.00000001 ); #so 1.005 rounds to 1.01
$charge = sprintf('%.2f', $charge);
+ }
warn "Incrementing \$charges by $charge. Now $charges\n" if $DEBUG;
$charges += $charge;
- }
# this is why we need regionnum/rate_region....
warn " (rate region $rate_region)\n" if $DEBUG;
More information about the freeside-commits
mailing list