fix errors about expired cards from automatic encryption enabling, RT#74905, RT#74085
[freeside.git] / FS / FS / cust_main.pm
index 2343fc6..21dce1f 100644 (file)
@@ -5787,6 +5787,15 @@ sub queueable_upgrade {
         # window for possible conflict is practically nonexistant,
         #   but just in case...
         $record = $record->select_for_update;
+        if (!$record->custnum && $table eq 'cust_pay_pending') {
+          $record->set('custnum_pending',1);
+        }
+
+        local($ignore_expired_card) = 1;
+        local($ignore_banned_card) = 1;
+        local($skip_fuzzyfiles) = 1;
+        local($import) = 1;#prevent automatic geocoding (need its own variable?)
+
         my $error = $record->replace;
         die $error if $error;
       }