[freeside-commits] freeside/FS/FS cdr.pm,1.78,1.79

Mark Wells mark at wavetail.420.am
Tue Dec 20 18:56:58 PST 2011


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

Modified Files:
	cdr.pm 
Log Message:
separate CDR summary by rate table, #15535

Index: cdr.pm
===================================================================
RCS file: /home/cvs/cvsroot/freeside/FS/FS/cdr.pm,v
retrieving revision 1.78
retrieving revision 1.79
diff -u -w -d -r1.78 -r1.79
--- cdr.pm	19 Dec 2011 23:16:28 -0000	1.78
+++ cdr.pm	21 Dec 2011 02:56:56 -0000	1.79
@@ -575,11 +575,11 @@
   },
   'sum_duration' => {
     'name'           => 'Summary (one line per service, with duration)',
-    'invoice_header' => 'Caller,Calls,Minutes,Price',
+    'invoice_header' => 'Caller,Rate,Calls,Minutes,Price',
   },
   'sum_count' => {
     'name'           => 'Summary (one line per service, with count)',
-    'invoice_header' => 'Caller,Messages,Price',
+    'invoice_header' => 'Caller,Rate,Messages,Price',
   },
 );
 
@@ -650,12 +650,14 @@
       # for summary formats, the CDR is a fictitious object containing the 
       # total billsec and the phone number of the service
       'src',
+      sub { my($cdr, %opt) = @_; $opt{ratename} },
       sub { my($cdr, %opt) = @_; $opt{count} },
       sub { my($cdr, %opt) = @_; int($opt{seconds}/60).'m' },
       $price_sub,
     ],
     'sum_count' => [
       'src',
+      sub { my($cdr, %opt) = @_; $opt{ratename} },
       sub { my($cdr, %opt) = @_; $opt{count} },
       $price_sub,
     ],
@@ -711,9 +713,13 @@
 
 format
 
-charge
+charge - override the 'rated_price' field of the CDR
 
-seconds
+seconds - override the 'billsec' field of the CDR
+
+count - number of usage events included in this record, for summary formats
+
+ratename - name of the rate table used to rate this call
 
 granularity
 



More information about the freeside-commits mailing list