[freeside-commits] branch master updated. 780141c7e972a8b55212515049bf3d51ef590466

Christopher Burger burgerc at freeside.biz
Mon May 14 09:46:31 PDT 2018


The branch, master has been updated
       via  780141c7e972a8b55212515049bf3d51ef590466 (commit)
      from  88371c24e0b727646f0b01288f01439a06967fe7 (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 780141c7e972a8b55212515049bf3d51ef590466
Author: Christopher Burger <burgerc at freeside.biz>
Date:   Mon May 14 12:45:48 2018 -0400

    RT# 77792 - fixed RBC format to display company name with business checking or savings is used

diff --git a/FS/FS/pay_batch/RBC.pm b/FS/FS/pay_batch/RBC.pm
index 21dae4256..1577a7f85 100644
--- a/FS/FS/pay_batch/RBC.pm
+++ b/FS/FS/pay_batch/RBC.pm
@@ -174,6 +174,11 @@ $name = 'RBC';
       die "invalid branch/routing number '$aba'\n";
     }
 
+    ## set custname to business name if business checking or savings account is used otherwise leave as first and last name.
+    my $custname = $cust_pay_batch->cust_main->first . ' ' . $cust_pay_batch->cust_main->last;
+    $custname = $cust_pay_batch->cust_main->company
+      if (($cust_pay_batch->{Hash}->{paytype} eq "Business checking" || $cust_pay_batch->{Hash}->{paytype} eq "Business savings") && $cust_pay_batch->cust_main->company);
+
     $i++;
 
     ## set to D for debit by default, then override to what cust_pay_batch has as payments may not have paycode.
@@ -194,8 +199,7 @@ $name = 'RBC';
     sprintf("%010.0f",$cust_pay_batch->amount*100).
     '      '.
     time2str("%Y%j", time + 86400).
-    sprintf("%-30.30s", encode('utf8', $cust_pay_batch->cust_main->first . ' ' .
-                     $cust_pay_batch->cust_main->last)).
+    sprintf("%-30.30s", encode('utf8', $custname)).
     'E'. # English
     ' '.
     sprintf("%-15s", $shortname).

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

Summary of changes:
 FS/FS/pay_batch/RBC.pm | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)




More information about the freeside-commits mailing list