[freeside-commits] freeside/FS/FS/part_pkg voip_cdr.pm, 1.3.2.1, 1.3.2.2

Jeff Finucane,420,, jeff at wavetail.420.am
Wed Feb 13 15:39:13 PST 2008


Update of /home/cvs/cvsroot/freeside/FS/FS/part_pkg
In directory wavetail.420.am:/tmp/cvs-serv13948/FS/FS/part_pkg

Modified Files:
      Tag: FREESIDE_1_7_BRANCH
	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.3.2.1
retrieving revision 1.3.2.2
diff -u -d -r1.3.2.1 -r1.3.2.2
--- voip_cdr.pm	21 Dec 2007 22:27:14 -0000	1.3.2.1
+++ voip_cdr.pm	13 Feb 2008 23:39:10 -0000	1.3.2.2
@@ -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