fix errors about expired cards from automatic encryption enabling, RT#74905, RT#74085
[freeside.git] / FS / FS / cust_main.pm
index 493b1c6..5ffc84a 100644 (file)
@@ -5407,6 +5407,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;
       }