RT#42398: still using cust_main.payby in FS::UI::Web::cust_sql_fields (v4+)
[freeside.git] / FS / FS / Upgrade.pm
index aa0498e..a374d39 100644 (file)
@@ -170,6 +170,14 @@ If you need to continue using the old Form 477 report, turn on the
     $conf->delete('unsuspendauto');
   }
 
+  if ($conf->config('cust-fields') =~ / \| Payment Type/) {
+    my $cust_fields = $conf->config('cust-fields');
+    # so we can potentially use 'Payment Types' or somesuch in the future
+    $cust_fields =~ s/ \| Payment Type( \|)/$1/;
+    $cust_fields =~ s/ \| Payment Type$//;
+    $conf->set('cust-fields',$cust_fields);
+  }
+
   enable_banned_pay_pad() unless length($conf->config('banned_pay-pad'));
 
 }