[freeside-commits] branch FREESIDE_3_BRANCH updated. 0a72c5a56914d96452a823f7419bd3caf392e3b5

Mark Wells mark at 420.am
Thu May 28 23:11:01 PDT 2015


The branch, FREESIDE_3_BRANCH has been updated
       via  0a72c5a56914d96452a823f7419bd3caf392e3b5 (commit)
      from  0788d4bf43324dd87c224a43983c8066f9cb2cbe (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 0a72c5a56914d96452a823f7419bd3caf392e3b5
Author: Mark Wells <mark at freeside.biz>
Date:   Thu May 28 23:06:10 2015 -0700

    limit length of customer name in RBC batch format; patch from Peter Loeppky, #35102

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).

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

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




More information about the freeside-commits mailing list