[freeside-commits] branch master updated. d33af60767250a06de12e123e6ba48eefd618535
Jeremy Davis
jeremyd at 420.am
Fri Feb 7 08:56:02 PST 2014
The branch, master has been updated
via d33af60767250a06de12e123e6ba48eefd618535 (commit)
from 6a38629bcb54a2ad9b8a5de6cac9f478bc4a7e66 (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 d33af60767250a06de12e123e6ba48eefd618535
Author: Jeremy Davis <jeremyd at freeside.biz>
Date: Thu Feb 6 17:45:04 2014 -0500
#26673 ACH changes
diff --git a/FS/FS/pay_batch/nacha.pm b/FS/FS/pay_batch/nacha.pm
index c069082..0662c3f 100644
--- a/FS/FS/pay_batch/nacha.pm
+++ b/FS/FS/pay_batch/nacha.pm
@@ -7,7 +7,7 @@ use Date::Format;
#use FS::Conf;
$name = 'NACHA';
-
+my $i;
$DEBUG = 0;
%import_info = (
@@ -79,7 +79,7 @@ $DEBUG = 0;
'1'. #Format code
$dest_name. #Immediate Destination Name / 23 char bank name
$company. #Immediate Origin Name / 23 char company name
- $refcode. #Reference Code (internal/optional)
+ $refcode. "\n". #Reference Code (internal/optional)
###
# Batch Header Record
@@ -110,7 +110,7 @@ $DEBUG = 0;
(' 'x3). #Settlement Date / Reserved
'1'. #Originator Status Code
substr($dest, 0, 8). #Originating Financial Institution
- $batchnum #Batch Number ("number batches sequentially")
+ $batchnum. "\n" #Batch Number ("number batches sequentially")
},
@@ -119,6 +119,10 @@ $DEBUG = 0;
my ($account, $aba) = split('@', $cust_pay_batch->payinfo);
+ $conf->config('batchconfig-nacha-destination') =~ /^\s*(\d{9})\s*$/
+ or die 'illegal NACHA Destination';
+ my $dest = $1;
+
# "Total of all positions 4-11 on each 6 record"
$entry_hash += substr($aba,0,8);
@@ -130,7 +134,8 @@ $DEBUG = 0;
my $transaction_code = ( $cust_main->paytype =~ /savings/i ? '37' : '27' );
my $cust_name = substr($cust_main->name. (' 'x22), 0, 22);
-
+ $i++;
+ my $tracenum = $dest. substr(('0'x7). $i, -6);
#non-PPD transactions? future
warn "building PPD Record\n" if $DEBUG;
@@ -148,8 +153,9 @@ $DEBUG = 0;
$cust_name. #Individual name (22-char)
' '. #2 char "company internal use if desired"
'0'. #Addenda Record Indicator
- (' 'x15) #15 digit "bank will assign trace number"
- # (00000?)
+# (' 'x15). #15 digit "bank will assign trace number"
+ $tracenum.
+ "\n" # (00000?)
},
'footer' => sub {
@@ -185,7 +191,7 @@ $DEBUG = 0;
(' 'x19). #Message Authentication Code (19 char blank)
(' 'x6). #Federal Reserve Use (6 char blank)
substr($dest, 0, 8). #Originating Financial Institution
- $batchnum. #Batch Number ("number batches sequentially")
+ $batchnum. "\n". #Batch Number ("number batches sequentially")
###
# File Control Record
-----------------------------------------------------------------------
Summary of changes:
FS/FS/pay_batch/nacha.pm | 20 +++++++++++++-------
1 files changed, 13 insertions(+), 7 deletions(-)
More information about the freeside-commits
mailing list