X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;ds=sidebyside;f=FS%2FFS%2Fsvc_broadband.pm;h=83c55b6b154f3645202464706eccf9ec08b7a668;hb=b24f2ed54a7aad4772a6d7c04035887f59fb3fe2;hp=307493264252cc270e927252dc99a0d6bff7f399;hpb=22dd966b4dac5e4146424cc7338abcf1264bc87d;p=freeside.git diff --git a/FS/FS/svc_broadband.pm b/FS/FS/svc_broadband.pm index 307493264..83c55b6b1 100755 --- a/FS/FS/svc_broadband.pm +++ b/FS/FS/svc_broadband.pm @@ -91,9 +91,9 @@ points to. You can ask the object for a copy with the I method. sub table_info { { - 'name' => 'Broadband', - 'name_plural' => 'Broadband services', - 'longname_plural' => 'Fixed (username-less) broadband services', + 'name' => 'Wireless broadband', + 'name_plural' => 'Wireless broadband services', + 'longname_plural' => 'Fixed wireless broadband services', 'display_weight' => 50, 'cancel_weight' => 70, 'ip_field' => 'ip_addr', @@ -246,6 +246,12 @@ sub search { push @where, "svcpart = $1"; } + #exportnum + if ( $params->{'exportnum'} =~ /^(\d+)$/ ) { + push @from, 'LEFT JOIN export_svc USING ( svcpart )'; + push @where, "exportnum = $1"; + } + #ip_addr if ( $params->{'ip_addr'} =~ /^(\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3})$/ ) { push @where, "ip_addr = '$1'"; @@ -271,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, } ); } @@ -303,7 +309,12 @@ Returns the IP address. sub label { my $self = shift; - $self->ip_addr; + my $label = 'IP:'. ($self->ip_addr || 'Unknown'); + $label .= ', MAC:'. $self->mac_addr + if $self->mac_addr; + $label .= ' ('. $self->description. ')' + if $self->description; + return $label; } =item insert [ , OPTION => VALUE ... ] @@ -365,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 =