[freeside-commits] freeside/FS/FS Conf.pm, 1.445, 1.446 Schema.pm, 1.291, 1.292 cust_bill.pm, 1.336, 1.337 cust_bill_pkg.pm, 1.53, 1.54 cust_bill_pkg_detail.pm, 1.15, 1.16

Erik Levinson levinse at wavetail.420.am
Tue Apr 26 22:22:23 PDT 2011


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

Modified Files:
	Conf.pm Schema.pm cust_bill.pm cust_bill_pkg.pm 
	cust_bill_pkg_detail.pm 
Log Message:
taqua accountcode billing, part 1 of 2, RT12181

Index: cust_bill_pkg_detail.pm
===================================================================
RCS file: /home/cvs/cvsroot/freeside/FS/FS/cust_bill_pkg_detail.pm,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -w -d -r1.15 -r1.16
--- cust_bill_pkg_detail.pm	23 Oct 2010 00:54:09 -0000	1.15
+++ cust_bill_pkg_detail.pm	27 Apr 2011 05:22:21 -0000	1.16
@@ -55,6 +55,8 @@
 
 =item phonenum -
 
+=item accountcode - accountcode
+
 =item detail - detail description
 
 =back
@@ -137,6 +139,7 @@
     || $self->ut_enum('format', [ '', 'C' ] )
     || $self->ut_numbern('duration')
     || $self->ut_textn('regionname')
+    || $self->ut_textn('accountcode')
     || $self->ut_text('detail')
     || $self->ut_foreign_keyn('classnum', 'usage_class', 'classnum')
     || $self->$phonenum_check_method('phonenum')

Index: Schema.pm
===================================================================
RCS file: /home/cvs/cvsroot/freeside/FS/FS/Schema.pm,v
retrieving revision 1.291
retrieving revision 1.292
diff -u -w -d -r1.291 -r1.292
--- Schema.pm	25 Apr 2011 04:37:07 -0000	1.291
+++ Schema.pm	27 Apr 2011 05:22:21 -0000	1.292
@@ -691,6 +691,7 @@
         'classnum', 'int', 'NULL', '', '', '',
         'duration', 'int', 'NULL', '',  0, '',
         'phonenum', 'varchar', 'NULL', 15, '', '',
+        'accountcode', 'varchar',  'NULL',      20, '', '',
         'regionname', 'varchar', 'NULL', $char_d, '', '',
         'detail',  'varchar', '', 255, '', '', 
       ],

Index: Conf.pm
===================================================================
RCS file: /home/cvs/cvsroot/freeside/FS/FS/Conf.pm,v
retrieving revision 1.445
retrieving revision 1.446
diff -u -w -d -r1.445 -r1.446
--- Conf.pm	24 Apr 2011 17:04:36 -0000	1.445
+++ Conf.pm	27 Apr 2011 05:22:21 -0000	1.446
@@ -2908,6 +2908,13 @@
   },
 
   {
+    'key'         => 'voip-cust_accountcode_cdr',
+    'section'     => 'telephony',
+    'description' => 'Enable the per-customer option for CDR breakdown by accountcode.',
+    'type'        => 'checkbox',
+  },
+
+  {
     'key'         => 'voip-cust_cdr_spools',
     'section'     => 'telephony',
     'description' => 'Enable the per-customer option for individual CDR spools.',

Index: cust_bill_pkg.pm
===================================================================
RCS file: /home/cvs/cvsroot/freeside/FS/FS/cust_bill_pkg.pm,v
retrieving revision 1.53
retrieving revision 1.54
diff -u -w -d -r1.53 -r1.54
--- cust_bill_pkg.pm	5 Feb 2011 02:17:56 -0000	1.53
+++ cust_bill_pkg.pm	27 Apr 2011 05:22:21 -0000	1.54
@@ -153,8 +153,9 @@
         'amount'     => (ref($detail) ? $detail->[2] : '' ),
         'classnum'   => (ref($detail) ? $detail->[3] : '' ),
         'phonenum'   => (ref($detail) ? $detail->[4] : '' ),
-        'duration'   => (ref($detail) ? $detail->[5] : '' ),
-        'regionname' => (ref($detail) ? $detail->[6] : '' ),
+        'accountcode' => (ref($detail) ? $detail->[5] : '' ),
+        'duration'   => (ref($detail) ? $detail->[6] : '' ),
+        'regionname' => (ref($detail) ? $detail->[7] : '' ),
       };
       $error = $cust_bill_pkg_detail->insert;
       if ( $error ) {

Index: cust_bill.pm
===================================================================
RCS file: /home/cvs/cvsroot/freeside/FS/FS/cust_bill.pm,v
retrieving revision 1.336
retrieving revision 1.337
diff -u -w -d -r1.336 -r1.337
--- cust_bill.pm	24 Apr 2011 15:09:11 -0000	1.336
+++ cust_bill.pm	27 Apr 2011 05:22:21 -0000	1.337
@@ -2829,6 +2829,9 @@
       push @{$late_sections}, @$phone_sections;
       push @detail_items, @$phone_lines;
     }
+    if ($conf->exists('voip-cust_accountcode_cdr') && $cust_main->accountcode_cdr) {
+        # XXX: do something not unlike _items_svc_phone_sections, except generate only one section
+    }
   }else{
     push @sections, { 'description' => '', 'subtotal' => '' };
   }
@@ -4700,7 +4703,6 @@
                 ext_description => \@d,
               };
             }
-
           }
 
         } # recurring or usage with recurring charge



More information about the freeside-commits mailing list