[freeside-commits] branch FREESIDE_3_BRANCH updated. 60f7d52e392352f4f1c4002478e86d03a8facf03

Ivan ivan at 420.am
Mon Jul 13 13:17:15 PDT 2015


The branch, FREESIDE_3_BRANCH has been updated
       via  60f7d52e392352f4f1c4002478e86d03a8facf03 (commit)
      from  ae2a98aa6d846caf5a2d597b0ff7c916ace24a6e (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 60f7d52e392352f4f1c4002478e86d03a8facf03
Author: Ivan Kohler <ivan at freeside.biz>
Date:   Mon Jul 13 13:17:14 2015 -0700

    batchconfig-nacha-origin_name

diff --git a/FS/FS/Conf.pm b/FS/FS/Conf.pm
index c9cae93..8c58e9d 100644
--- a/FS/FS/Conf.pm
+++ b/FS/FS/Conf.pm
@@ -4006,6 +4006,13 @@ and customer address. Include units.',
   },
 
   {
+    'key'         => 'batchconfig-nacha-origin_name',
+    'section'     => 'billing',
+    'description' => 'Configuration for NACHA batching, Origin name (defaults to company name, but sometimes bank name is needed instead.)'.
+    'type'        => 'text',
+  },
+
+  {
     'key'         => 'batch-manual_approval',
     'section'     => 'billing',
     'description' => 'Allow manual batch closure, which will approve all payments that do not yet have a status.  This is not advised unless needed for specific payment processors that provide a report of rejected rather than approved payments.',
diff --git a/FS/FS/pay_batch/nacha.pm b/FS/FS/pay_batch/nacha.pm
index 0361304..befba09 100644
--- a/FS/FS/pay_batch/nacha.pm
+++ b/FS/FS/pay_batch/nacha.pm
@@ -47,7 +47,12 @@ $DEBUG = 0;
     my $origin = $1;
 
     my $company = $conf->config('company_name', $pay_batch->agentnum);
-    $company = substr(uc($company). (' 'x23), 0, 23);
+
+    my $origin_name =  $conf->config('batchconfig-nacha-origin_name')
+                    || $company;
+    $origin_name = substr(uc($origin_name). (' 'x23), 0, 23);
+
+    $company = substr(uc($company). (' 'x16), 0, 16);
 
     my $now = time;
 
@@ -78,7 +83,7 @@ $DEBUG = 0;
     '10'.                     #Blocking Factor
     '1'.                      #Format code
     $dest_name.               #Immediate Destination Name / 23 char bank name
-    $company.                 #Immediate Origin Name / 23 char company name
+    $origin_name.             #Immediate Origin Name / 23 char company name
     $refcode. "\n".           #Reference Code (internal/optional)
 
     ###
@@ -88,7 +93,7 @@ $DEBUG = 0;
     '5'.                     #Record Type Code
     '225'.                   #Service Class Code (220 credits only,
                              #                    200 mixed debits & credits)
-    substr($company, 0, 16). #on cust. statements
+    $company.                #on cust. statements
     (' 'x20 ).               #20 char "company internal use if desired"
     $origin.                 #Company Identification (Immediate Origin)
     'PPD'. #others?

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

Summary of changes:
 FS/FS/Conf.pm            |    7 +++++++
 FS/FS/pay_batch/nacha.pm |   11 ++++++++---
 2 files changed, 15 insertions(+), 3 deletions(-)




More information about the freeside-commits mailing list