when uncanceling services, clean up those that failed to export, from #22385
[freeside.git] / FS / FS / svc_broadband.pm
index 46d046c..83c55b6 100755 (executable)
@@ -277,7 +277,7 @@ sub search {
       ),
       'extra_sql' => $extra_sql,
       'addl_from' => $addl_from,
-      'order_by'  => "ORDER BY ".($params->{'order_by'} || 'svcnum'),
+      'order_by'  => ($params->{'order_by'} || 'ORDER BY svcnum'),
       'count_query' => $count_query,
     } );
 }
@@ -310,7 +310,7 @@ Returns the IP address.
 sub label {
   my $self = shift;
   my $label = 'IP:'. ($self->ip_addr || 'Unknown');
-  $label .= '", MAC:'. $self->mac_addr
+  $label .= ', MAC:'. $self->mac_addr
     if $self->mac_addr;
   $label .= ' ('. $self->description. ')'
     if $self->description;
@@ -376,7 +376,7 @@ sub check {
 
   # remove delimiters
   my $mac_addr = uc($self->get('mac_addr'));
-  $mac_addr =~ s/[-: ]//g;
+  $mac_addr =~ s/[\W_]//g;
   $self->set('mac_addr', $mac_addr);
 
   my $error =