X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=FS%2FFS%2Fsvc_broadband.pm;h=869d9a537a4c47695351830ed6f2b0135964135c;hb=9e0c782a41292cac8d06f0a3b3ef54b7dc5f5a27;hp=af8135304250921160527025ce1ac5e2fdab61de;hpb=87f255507af9f14dfbccd37eefd71a148f9af344;p=freeside.git diff --git a/FS/FS/svc_broadband.pm b/FS/FS/svc_broadband.pm index af8135304..869d9a537 100755 --- a/FS/FS/svc_broadband.pm +++ b/FS/FS/svc_broadband.pm @@ -182,7 +182,7 @@ sub search { 'LEFT JOIN cust_svc USING ( svcnum )', 'LEFT JOIN part_svc USING ( svcpart )', 'LEFT JOIN cust_pkg USING ( pkgnum )', - 'LEFT JOIN cust_main USING ( custnum )', + FS::UI::Web::join_cust_main('cust_pkg', 'cust_pkg'), ); # based on FS::svc_acct::search, probably the most mature of the bunch @@ -313,7 +313,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 ... ] @@ -377,7 +382,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 =