[freeside-commits] branch master updated. 6ebc654a3f2f82be62b16b5bec62b0dd1862e53e

Jonathan Prykop jonathan at 420.am
Wed Feb 1 13:07:30 PST 2017


The branch, master has been updated
       via  6ebc654a3f2f82be62b16b5bec62b0dd1862e53e (commit)
      from  5b9bce86c42fd4e0c3a6d89e21e6b3eeb59f7f3a (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 6ebc654a3f2f82be62b16b5bec62b0dd1862e53e
Author: Jonathan Prykop <jonathan at freeside.biz>
Date:   Wed Feb 1 15:06:52 2017 -0600

    71513: Card tokenization [bug fix to upgrade]

diff --git a/FS/FS/cust_main.pm b/FS/FS/cust_main.pm
index e0855d8..806db00 100644
--- a/FS/FS/cust_main.pm
+++ b/FS/FS/cust_main.pm
@@ -5451,11 +5451,12 @@ sub _upgrade_next_recnum {
   my $recnum = shift @$recnums;
   return $recnum if $recnum;
   my $tclass = 'FS::'.$table;
+  my $paycardtypecheck = ($table ne 'cust_pay_pending') ? q( OR paycardtype = 'Tokenized') : '';
   my $sql = 'SELECT '.$tclass->primary_key.
             ' FROM '.$table.
             ' WHERE '.$tclass->primary_key.' > '.$$lastrecnum.
             "   AND payby IN ( 'CARD', 'DCRD', 'CHEK', 'DCHK' ) ".
-            "   AND ( length(payinfo) < 80 OR paycardtype = 'Tokenized' ) ".
+            "   AND ( length(payinfo) < 80$paycardtypecheck ) ".
             ' ORDER BY '.$tclass->primary_key.' LIMIT 500';
   my $sth = $dbh->prepare($sql) or die $dbh->errstr;
   $sth->execute() or die $sth->errstr;

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

Summary of changes:
 FS/FS/cust_main.pm |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)




More information about the freeside-commits mailing list