table => 'export_batch',
references => [ 'batchnum' ]
},
- { columns => [ 'svcnum' ],
- table => 'cust_svc',
- references => [ 'svcnum' ]
- },
],
},
|| $self->ut_number('batchnum')
|| $self->ut_foreign_key('batchnum', 'export_batch', 'batchnum')
|| $self->ut_number('svcnum')
- || $self->ut_foreign_key('svcnum', 'cust_svc', 'svcnum')
|| $self->ut_enum('action',
[ qw(insert delete replace suspend unsuspend relocate) ]
)
# ignore items that have no data to add to the batch
next if $item->action eq 'suspend' or $item->action eq 'unsuspend';
- my $svcnum = $item->svcnum;
my $data = $item->data;
%hash = %{ $item_format->parse($data) };
my $phonenum = $hash{npa} . $hash{calling_number};
local $FS::UID::AutoCommit = 0;
my $dbh = dbh;
- my $error = $self->SUPER::delete(@_)
- || $self->process_m2m(
+ my $error = $self->process_m2m(
'link_table' => 'radius_usergroup',
'target_table' => 'radius_group',
'params' => [],
- );
+ )
+ || $self->SUPER::delete;
if ( $error ) {
$dbh->rollback if $oldAutoCommit;