diff options
author | Christopher Burger <burgerc@freeside.biz> | 2018-05-14 12:45:48 -0400 |
---|---|---|
committer | Christopher Burger <burgerc@freeside.biz> | 2018-05-18 11:44:55 -0400 |
commit | e96f711e84bba96db24a91a1053e8a48e807b816 (patch) | |
tree | 77d92379eac415e9b17a5d45b5b20f46b658bb44 | |
parent | 68e64cd688ba399ed4d86de5e8f710269a39c76d (diff) |
RT# 77792 - fixed RBC format to display company name with business checking or savings is used
-rw-r--r-- | FS/FS/pay_batch/RBC.pm | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/FS/FS/pay_batch/RBC.pm b/FS/FS/pay_batch/RBC.pm index b0136786b..14b9993fc 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++; sprintf("%06u", $i). 'D'. @@ -189,8 +194,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). |