[freeside-commits] branch FREESIDE_3_BRANCH updated. 1bcbd951817f4e20a10bebd44a45c8790af8a92d
Jeremy Davis
jeremyd at 420.am
Tue Dec 16 08:33:15 PST 2014
The branch, FREESIDE_3_BRANCH has been updated
via 1bcbd951817f4e20a10bebd44a45c8790af8a92d (commit)
from 4cbb5a4b52b2c49578eed3add1c3400b218079e4 (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 1bcbd951817f4e20a10bebd44a45c8790af8a92d
Author: Jeremy Davis <jeremyd at freeside.biz>
Date: Tue Dec 16 11:32:12 2014 -0500
Ticket 31993 different trans codes for business and personal
diff --git a/FS/FS/Conf.pm b/FS/FS/Conf.pm
index 9f00184..79b74c4 100644
--- a/FS/FS/Conf.pm
+++ b/FS/FS/Conf.pm
@@ -3847,7 +3847,7 @@ and customer address. Include units.',
{
'key' => 'batchconfig-eft_canada',
'section' => 'billing',
- 'description' => 'Configuration for EFT Canada batching, four lines: 1. SFTP username, 2. SFTP password, 3. Transaction code, 4. Number of days to delay process date. If you are using separate per-agent batches (batch-spoolagent), you must set this option separately for each agent, as the global setting will be ignored.',
+ 'description' => 'Configuration for EFT Canada batching, five lines: 1. SFTP username, 2. SFTP password, 3. Business transaction code, 4. Personal transaction code, 5. Number of days to delay process date. If you are using separate per-agent batches (batch-spoolagent), you must set this option separately for each agent, as the global setting will be ignored.',
'type' => 'textarea',
'per_agent' => 1,
},
diff --git a/FS/FS/pay_batch/eft_canada.pm b/FS/FS/pay_batch/eft_canada.pm
index 0c09321..ab9e6a3 100644
--- a/FS/FS/pay_batch/eft_canada.pm
+++ b/FS/FS/pay_batch/eft_canada.pm
@@ -15,7 +15,7 @@ $name = 'eft_canada';
%import_info = ( filetype => 'NONE' ); # see FS/bin/freeside-eftca-download
-my ($trans_code, $process_date);
+my ($business_trans_code, $personal_trans_code, $trans_code, $process_date);
#ref http://gocanada.about.com/od/canadatravelplanner/a/canada_holidays.htm
my %holiday_yearly = (
@@ -66,7 +66,8 @@ my %holiday = (
@config = $conf->config('batchconfig-eft_canada');
}
# SFTP login, password, trans code, delay time
- ($trans_code) = $config[2];
+ ($business_trans_code) = $config[2];
+ ($personal_trans_code) = $config[3];
$process_date = time2str('%D', process_date($conf, $agentnum));
},
@@ -82,12 +83,14 @@ my %holiday = (
my $company = sprintf('%.64s', $cust_pay_batch->cust_main->company);
if ( $company ) {
push @fields, 'Business';
- push @fields, $company, ''
+ push @fields, $company, '';
+ $trans_code = $business_trans_code;
}
else {
push @fields, 'Personal';
push @fields, map { sprintf('%.64s', $_) }
$cust_pay_batch->first, $cust_pay_batch->last;
+ $trans_code = $personal_trans_code;
}
my ($account, $aba) = split('@', $cust_pay_batch->payinfo);
my($bankno, $branch);
-----------------------------------------------------------------------
Summary of changes:
FS/FS/Conf.pm | 2 +-
FS/FS/pay_batch/eft_canada.pm | 9 ++++++---
2 files changed, 7 insertions(+), 4 deletions(-)
More information about the freeside-commits
mailing list