summaryrefslogtreecommitdiff
path: root/FS/FS/svc_cable.pm
diff options
context:
space:
mode:
authorIvan Kohler <ivan@freeside.biz>2013-11-17 21:52:29 -0800
committerIvan Kohler <ivan@freeside.biz>2013-11-17 21:52:29 -0800
commitc2c351d0bf1e8c930290510c0ffcf3d455dad871 (patch)
treeb89c15bcd8a59f2fb37d3a11e1da0a27d669ff29 /FS/FS/svc_cable.pm
parent952fcd191c3a6f12dfc4da510441460fcb93b0a8 (diff)
svc_cable label, RT#26013
Diffstat (limited to 'FS/FS/svc_cable.pm')
-rw-r--r--FS/FS/svc_cable.pm20
1 files changed, 19 insertions, 1 deletions
diff --git a/FS/FS/svc_cable.pm b/FS/FS/svc_cable.pm
index 672a34d..4b42393 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;
@@ -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,