[freeside-commits] branch FREESIDE_3_BRANCH updated. 044e3bcb6bbe6d011116b4a0cfa49023e6c391f0

Ivan ivan at 420.am
Thu Oct 10 22:51:43 PDT 2013


The branch, FREESIDE_3_BRANCH has been updated
       via  044e3bcb6bbe6d011116b4a0cfa49023e6c391f0 (commit)
      from  49d620491ee0004274c066156748d41bae7e2b3d (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 044e3bcb6bbe6d011116b4a0cfa49023e6c391f0
Author: Ivan Kohler <ivan at freeside.biz>
Date:   Thu Oct 10 22:51:42 2013 -0700

    add billco-account_num option, RT#22934

diff --git a/FS/FS/Conf.pm b/FS/FS/Conf.pm
index 39a19ad..0d8d3be 100644
--- a/FS/FS/Conf.pm
+++ b/FS/FS/Conf.pm
@@ -934,7 +934,19 @@ sub reason_type_options {
     'type'        => 'text',
     'per_agent'   => 1,
   },
-  
+
+  {
+    'key'         => 'billco-account_num',
+    'section'     => 'billing',
+    'description' => 'The data to place in the "Transaction Account No" / "TRACCTNUM" field.',
+    'type'        => 'select',
+    'select_hash' => [
+                       'invnum-date' => 'Invoice number - Date (default)',
+                       'display_custnum'  => 'Customer number',
+                     ],
+    'per_agent'   => 1,
+  },
+
   {
     'key'         => 'next-bill-ignore-time',
     'section'     => 'billing',
diff --git a/FS/FS/cust_bill.pm b/FS/FS/cust_bill.pm
index a747a78..a61adde 100644
--- a/FS/FS/cust_bill.pm
+++ b/FS/FS/cust_bill.pm
@@ -1972,6 +1972,13 @@ sub print_csv {
 
   if ( $format eq 'billco' ) {
 
+    my $account_num =
+      $self->conf->config('billco-account_num', $cust_main->agentnum);
+
+    my $tracctnum = $account_num eq 'display_custnum'
+                      ? $cust_main->display_custnum
+                      : $opt{'tracctnum'};
+
     my $taxtotal = 0;
     $taxtotal += $_->{'amount'} foreach $self->_items_tax;
 
@@ -1988,7 +1995,7 @@ sub print_csv {
     $csv->combine(
       '',                         #  1 | N/A-Leave Empty               CHAR   2
       '',                         #  2 | N/A-Leave Empty               CHAR  15
-      $opt{'tracctnum'},          #  3 | Transaction Account No        CHAR  15
+      $tracctnum,                 #  3 | Transaction Account No        CHAR  15
       $self->invnum,              #  4 | Transaction Invoice No        CHAR  15
       $cust_main->zip,            #  5 | Transaction Zip Code          CHAR   5
       $cust_main->company,        #  6 | Transaction Company Bill To   CHAR  30

-----------------------------------------------------------------------

Summary of changes:
 FS/FS/Conf.pm      |   14 +++++++++++++-
 FS/FS/cust_bill.pm |    9 ++++++++-
 2 files changed, 21 insertions(+), 2 deletions(-)




More information about the freeside-commits mailing list