diff options
-rw-r--r-- | FS/FS/svc_cable.pm | 9 | ||||
-rw-r--r-- | FS/FS/svc_hardware.pm | 11 |
2 files changed, 14 insertions, 6 deletions
diff --git a/FS/FS/svc_cable.pm b/FS/FS/svc_cable.pm index 50859dabc..9e818e142 100644 --- a/FS/FS/svc_cable.pm +++ b/FS/FS/svc_cable.pm @@ -126,9 +126,12 @@ sub label { my @label = (); push @label, 'MAC:'. $self->mac_addr_pretty if $self->mac_addr; - push @label, ($part_svc->part_svc_column('serialnum') || 'Serial#'). - $self->serialnum - if $self->serialnum; + if ( $self->serialnum ) { + my $serialnum_label = $part_svc->part_svc_column('serialnum'); + push @label, + ($serialnum_label && $serialnum_label->columnlabel || 'Serial#'). + $self->serialnum; + } return join(', ', @label); } diff --git a/FS/FS/svc_hardware.pm b/FS/FS/svc_hardware.pm index c8bf02ffb..4bff483e1 100644 --- a/FS/FS/svc_hardware.pm +++ b/FS/FS/svc_hardware.pm @@ -137,14 +137,19 @@ sub label { my $part_svc = $self->cust_svc->part_svc; my @label = (); if (my $type = $self->hardware_type) { - push @label, ($part_svc->part_svc_column('typenum') || 'Type:'). + my $typenum_label = $part_svc->part_svc_column('typenum'); + push @label, ( $typenum_label && $typenum_label->columnlabel || 'Type:' ). $type->description; } if (my $ser = $self->serial) { - push @label, ($part_svc->part_svc_column('serial') || 'Serial#'). $ser; + my $serial_label = $part_svc->part_svc_column('serial'); + push @label, ( $serial_label && $serial_label->columnlabel || 'Serial#' ). + $ser; } if (my $mac = $self->display_hw_addr) { - push @label, ($part_svc->part_svc_column('hw_addr') || 'MAC:'). $mac; + my $hw_addr_label = $part_svc->part_svc_column('hw_addr'); + push @label, ( $hw_addr_label && $hw_addr_label->columnlabel || 'MAC:'). + $mac; } return join(', ', @label); } |