[freeside-commits] branch FREESIDE_3_BRANCH updated. 3994fafc85cc15e59f3eb5dda9015e651631f624

Ivan ivan at 420.am
Mon Feb 6 10:32:47 PST 2017


The branch, FREESIDE_3_BRANCH has been updated
       via  3994fafc85cc15e59f3eb5dda9015e651631f624 (commit)
      from  81666084b755dcc1a5850f4df4501f300f6b364c (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 3994fafc85cc15e59f3eb5dda9015e651631f624
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 abf51fa..54f5613 100644
--- a/FS/FS/cust_main.pm
+++ b/FS/FS/cust_main.pm
@@ -5817,11 +5817,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