From: Ivan Kohler Date: Fri, 12 Feb 2016 18:54:26 +0000 (-0800) Subject: payby upgrade first so other cust_main->replace operations don't error out, RT#32043 X-Git-Url: http://git.freeside.biz/gitweb/?a=commitdiff_plain;h=3f11a5e5c2026eb23eeed1eab780c95279062576;p=freeside.git payby upgrade first so other cust_main->replace operations don't error out, RT#32043 --- diff --git a/FS/FS/cust_main.pm b/FS/FS/cust_main.pm index f0a152bc0..d6c7754e6 100644 --- a/FS/FS/cust_main.pm +++ b/FS/FS/cust_main.pm @@ -5502,7 +5502,8 @@ sub _upgrade_data { #class method local(@encrypted_fields) = (); local($FS::cust_payby::ignore_expired_card) = 1; - local($FS::cust_payby::ignore_banned_card) = 1; + local($FS::cust_payby::ignore_banned_card) = 1; + local($FS::cust_payby::ignore_cardtype) = 1; my @payfields = qw( payby payinfo paycvv paymask paydate paystart_month paystart_year payissue @@ -5524,7 +5525,6 @@ sub _upgrade_data { #class method map { $_ => $cust_main->$_(); } @payfields }; - local($FS::cust_payby::ignore_cardtype) = 1; my $error = $cust_payby->insert; die $error if $error;