diff options
author | Ivan Kohler <ivan@freeside.biz> | 2016-11-17 02:04:32 -0800 |
---|---|---|
committer | Ivan Kohler <ivan@freeside.biz> | 2016-11-17 02:04:32 -0800 |
commit | 37a23f4ca89d7f18274721f1281df9df9e93701c (patch) | |
tree | 78e95eca490825deda892344d2e83e091e230026 /FS | |
parent | 765301c50ceefa897cc9541edb46adca568cb692 (diff) |
respect part_svc labels in svc_hardware & svc_cable short service labels, RT#73405
Diffstat (limited to 'FS')
-rw-r--r-- | FS/FS/svc_cable.pm | 4 | ||||
-rw-r--r-- | FS/FS/svc_hardware.pm | 8 |
2 files changed, 8 insertions, 4 deletions
diff --git a/FS/FS/svc_cable.pm b/FS/FS/svc_cable.pm index 01c5de7..50859da 100644 --- a/FS/FS/svc_cable.pm +++ b/FS/FS/svc_cable.pm @@ -122,10 +122,12 @@ Returns the MAC address and serial number. sub label { my $self = shift; + my $part_svc = $self->cust_svc->part_svc; my @label = (); push @label, 'MAC:'. $self->mac_addr_pretty if $self->mac_addr; - push @label, 'Serial#'. $self->serialnum + push @label, ($part_svc->part_svc_column('serialnum') || 'Serial#'). + $self->serialnum if $self->serialnum; return join(', ', @label); } diff --git a/FS/FS/svc_hardware.pm b/FS/FS/svc_hardware.pm index dbb8b68..c8bf02f 100644 --- a/FS/FS/svc_hardware.pm +++ b/FS/FS/svc_hardware.pm @@ -134,15 +134,17 @@ sub search_sql { sub label { my $self = shift; + my $part_svc = $self->cust_svc->part_svc; my @label = (); if (my $type = $self->hardware_type) { - push @label, 'Type:' . $type->description; + push @label, ($part_svc->part_svc_column('typenum') || 'Type:'). + $type->description; } if (my $ser = $self->serial) { - push @label, 'Serial#' . $ser; + push @label, ($part_svc->part_svc_column('serial') || 'Serial#'). $ser; } if (my $mac = $self->display_hw_addr) { - push @label, 'MAC:'. $mac; + push @label, ($part_svc->part_svc_column('hw_addr') || 'MAC:'). $mac; } return join(', ', @label); } |