my $class = shift;
my $table = $class->table or die "upgrade_set_cardtype needs a table";
- if ( ! FS::upgrade_journal->is_done("${table}__set_cardtype2") ) {
+ if ( ! FS::upgrade_journal->is_done("${table}__set_cardtype") ) {
my $job = FS::queue->new({ job => 'FS::payinfo_Mixin::process_set_cardtype' });
my $error = $job->insert($table);
die $error if $error;
- FS::upgrade_journal->set_done("${table}__set_cardtype2");
+ FS::upgrade_journal->set_done("${table}__set_cardtype");
}
}
local $ignore_masked_payinfo = 1;
my $search = FS::Cursor->new({
table => $table,
- extra_sql => q[ WHERE payby IN('CARD','DCRD') AND ( paycardtype IS NULL or paycardtype = 'Not a credit card' ) ],
+ extra_sql => q[ WHERE payby IN('CARD','DCRD') AND paycardtype IS NULL ],
});
while (my $record = $search->fetch) {
my $error = $record->replace;