[freeside-commits] freeside/FS/FS/part_pkg voip_cdr.pm,1.4,1.5
Jeff Finucane,420,,
jeff at wavetail.420.am
Wed Feb 13 15:42:02 PST 2008
Update of /home/cvs/cvsroot/freeside/FS/FS/part_pkg
In directory wavetail.420.am:/tmp/cvs-serv14060/FS/FS/part_pkg
Modified Files:
voip_cdr.pm
Log Message:
directory assistance (flat per-call) billing RT#3114
Index: voip_cdr.pm
===================================================================
RCS file: /home/cvs/cvsroot/freeside/FS/FS/part_pkg/voip_cdr.pm,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -d -r1.4 -r1.5
--- voip_cdr.pm 1 Mar 2007 20:56:26 -0000 1.4
+++ voip_cdr.pm 13 Feb 2008 23:42:00 -0000 1.5
@@ -261,9 +261,13 @@
my $granularity = $rate_detail->sec_granularity;
my $seconds = $cdr->billsec; # |ength($cdr->billsec) ? $cdr->billsec : $cdr->duration;
- $seconds += $granularity - ( $seconds % $granularity );
+ $seconds += $granularity - ( $seconds % $granularity )
+ if $granularity; # 0 is per call
my $minutes = sprintf("%.1f", $seconds / 60);
$minutes =~ s/\.0$// if $granularity == 60;
+
+ # per call rather than per minute
+ $minutes = 1 unless $granularity;
$included_min{$regionnum} -= $minutes;
@@ -280,7 +284,7 @@
@call_details = (
#time2str("%Y %b %d - %r", $cdr->calldate_unix ),
time2str("%c", $cdr->calldate_unix), #XXX this should probably be a config option dropdown so they can select US vs- rest of world dates or whatnot
- $minutes.'m',
+ $granularity ? $minutes.'m' : $minutes.' call',
'$'.$charge,
$pretty_destnum,
$rate_region->regionname,
More information about the freeside-commits
mailing list