X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=FS%2FFS%2Fsvc_cable.pm;h=0c0d684e00328ae3f596bcdcccbc3bb2901d0456;hb=9b27a2b16c37b060ef48029581e4196990a9963b;hp=672a34d7b71dd08ac35c61ecf71a48e50a33b5e1;hpb=368a5e5e75b2072003641c1938fcb1423a9fb30c;p=freeside.git diff --git a/FS/FS/svc_cable.pm b/FS/FS/svc_cable.pm index 672a34d7b..0c0d684e0 100644 --- a/FS/FS/svc_cable.pm +++ b/FS/FS/svc_cable.pm @@ -1,5 +1,7 @@ package FS::svc_cable; -use base qw( FS::svc_Common ); #qw( FS::device_Common FS::svc_Common ); +use base qw( FS::svc_MAC_Mixin + FS::svc_Common + ); #FS::device_Common use strict; use Tie::IxHash; @@ -99,7 +101,7 @@ sub table_info { type => 'input-mac_addr', value_callback => sub { my $svc = shift; - join(':', $svc->mac_addr =~ /../g); + $svc->mac_addr_formatted('U',':'); }, }, ; @@ -115,6 +117,22 @@ sub table_info { }; } +=item label + +Returns the MAC address and serial number. + +=cut + +sub label { + my $self = shift; + my @label = (); + push @label, 'MAC:'. $self->mac_addr_pretty + if $self->mac_addr; + push @label, 'Serial#'. $self->serialnum + if $self->serialnum; + return join(', ', @label); +} + =item insert Adds this record to the database. If there is an error, returns the error,