[freeside-commits] branch master updated. 54db570dc261f7cde343fa78ef92855f6d576570
Ivan
ivan at 420.am
Thu Oct 10 22:51:42 PDT 2013
The branch, master has been updated
via 54db570dc261f7cde343fa78ef92855f6d576570 (commit)
from 22f8f47d6b14d421b9ce8fd5d901df28c220281a (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 54db570dc261f7cde343fa78ef92855f6d576570
Author: Ivan Kohler <ivan at freeside.biz>
Date: Thu Oct 10 22:51:41 2013 -0700
add billco-account_num option, RT#22934
diff --git a/FS/FS/Conf.pm b/FS/FS/Conf.pm
index 16bbaad..dd4cd68 100644
--- a/FS/FS/Conf.pm
+++ b/FS/FS/Conf.pm
@@ -935,7 +935,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