[freeside-commits] freeside/FS/FS cdr.pm, 1.71, 1.72 Conf.pm, 1.449, 1.450

Erik Levinson levinse at wavetail.420.am
Wed May 4 23:53:38 PDT 2011


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

Modified Files:
	cdr.pm Conf.pm 
Log Message:
self-service view usage customization and CDR display fixes, RT11761

Index: Conf.pm
===================================================================
RCS file: /home/cvs/cvsroot/freeside/FS/FS/Conf.pm,v
retrieving revision 1.449
retrieving revision 1.450
diff -u -w -d -r1.449 -r1.450
--- Conf.pm	4 May 2011 01:07:10 -0000	1.449
+++ Conf.pm	5 May 2011 06:53:35 -0000	1.450
@@ -3869,6 +3869,13 @@
   },
 
   {
+    'key'         => 'selfservice-view_usage_nodomain',
+    'section'     => 'self-service',
+    'description' => 'Show usernames without their domains in "View my usage" in the self-service interface.',
+    'type'        => 'checkbox',
+  },
+
+  {
     'key'         => 'selfservice-bulk_format',
     'section'     => 'deprecated',
     'description' => 'Parameter arrangement for selfservice bulk features',

Index: cdr.pm
===================================================================
RCS file: /home/cvs/cvsroot/freeside/FS/FS/cdr.pm,v
retrieving revision 1.71
retrieving revision 1.72
diff -u -w -d -r1.71 -r1.72
--- cdr.pm	27 Apr 2011 23:24:15 -0000	1.71
+++ cdr.pm	5 May 2011 06:53:35 -0000	1.72
@@ -560,11 +560,11 @@
   my $duration_sub = sub {
     my($cdr, %opt) = @_;
     my $sec = $opt{seconds} || $cdr->billsec;
-    if ( length($opt{granularity}) && 
+    if ( defined $opt{granularity} && 
          $opt{granularity} == 0 ) { #per call
       return '1 call';
     }
-    elsif ( $opt{granularity} == 60 ) {#full minutes
+    elsif ( defined $opt{granularity} && $opt{granularity} == 60 ) {#full minutes
       my $min = int($sec/60);
       $min++ if $sec%60;
       return $min.'m';
@@ -620,7 +620,10 @@
       $duration_sub,
 
       #PRICE
-      sub { my($cdr, %opt) = @_; $opt{money_char}. $opt{charge}; },
+      sub { my($cdr, %opt) = @_; 
+        $opt{charge} = '0.00' unless defined $opt{charge};
+        $opt{money_char}.$opt{charge}; 
+      },
 
     ],
   );
@@ -660,6 +663,8 @@
         }
     @{ $formats{$format} };
 
+  return @columns if defined $opt{'keeparray'};
+
   my $status = $csv->combine(@columns);
   die "FS::CDR: error combining ". $csv->error_input(). "into downstream CSV"
     unless $status;



More information about the freeside-commits mailing list