[freeside-commits] freeside/FS/FS/part_pkg voip_cdr.pm,1.74,1.75
Ivan,,,
ivan at wavetail.420.am
Tue Jul 21 00:03:13 PDT 2009
Update of /home/cvs/cvsroot/freeside/FS/FS/part_pkg
In directory wavetail.420.am:/tmp/cvs-serv27470
Modified Files:
voip_cdr.pm
Log Message:
yow. fix spurious charge errors w/single_price, round to four decimal places (wtf?) instead of 2, RT#5495
Index: voip_cdr.pm
===================================================================
RCS file: /home/cvs/cvsroot/freeside/FS/FS/part_pkg/voip_cdr.pm,v
retrieving revision 1.74
retrieving revision 1.75
diff -u -d -r1.74 -r1.75
--- voip_cdr.pm 21 Jul 2009 05:29:41 -0000 1.74
+++ voip_cdr.pm 21 Jul 2009 07:03:11 -0000 1.75
@@ -475,10 +475,12 @@
my $minutes = sprintf("%.1f", $seconds / 60);
$minutes =~ s/\.0$// ;# if $granularity == 60;
- $charge = sprintf('%.2f', ( $self->option('min_charge') * $minutes )
- + 0.00000001 ); #so 1.005 rounds to 1.01
+ # XXX config?
+ #$charge = sprintf('%.2f', ( $self->option('min_charge') * $minutes )
+ #+ 0.00000001 ); #so 1.005 rounds to 1.01
+ $charge = sprintf('%.4f', ( $self->option('min_charge') * $minutes )
+ + 0.0000000001 ); #so 1.00005 rounds to 1.0001
- $charge =
$charges += $charge;
@call_details = ($cdr->downstream_csv( 'format' => $output_format,
More information about the freeside-commits
mailing list