summaryrefslogtreecommitdiff
path: root/FS/FS/pay_batch
diff options
context:
space:
mode:
authorMark Wells <mark@freeside.biz>2015-05-26 12:51:29 -0700
committerMark Wells <mark@freeside.biz>2015-05-26 12:51:29 -0700
commit7cd918b8463886744316e2f5b6fb75feefd184e7 (patch)
treea55159f42cab4a82a93f7f0247641bae1bf41dd9 /FS/FS/pay_batch
parente1f3623d238aa5c2717c082ef7427cd460c34e02 (diff)
limit length of customer name in RBC batch format; patch from Peter Loeppky, #35102
Diffstat (limited to 'FS/FS/pay_batch')
-rw-r--r--FS/FS/pay_batch/RBC.pm5
1 files changed, 3 insertions, 2 deletions
diff --git a/FS/FS/pay_batch/RBC.pm b/FS/FS/pay_batch/RBC.pm
index 45e888d..1310640 100644
--- a/FS/FS/pay_batch/RBC.pm
+++ b/FS/FS/pay_batch/RBC.pm
@@ -4,6 +4,7 @@ use strict;
use vars qw(@ISA %import_info %export_info $name);
use Date::Format 'time2str';
use FS::Conf;
+use Encode 'encode';
my $conf;
my ($client_num, $shortname, $longname, $trans_code, $testmode, $i, $declined, $totaloffset);
@@ -174,8 +175,8 @@ $name = 'RBC';
sprintf("%010.0f",$cust_pay_batch->amount*100).
' '.
time2str("%Y%j", $pay_batch->download).
- sprintf("%-30s", $cust_pay_batch->cust_main->first . ' ' .
- $cust_pay_batch->cust_main->last).
+ sprintf("%-30.30s", encode('utf8', $cust_pay_batch->cust_main->first . ' ' .
+ $cust_pay_batch->cust_main->last)).
'E'. # English
' '.
sprintf("%-15s", $shortname).