[freeside-commits] branch FREESIDE_3_BRANCH updated. aacc031f9766621bb5addffeab0fbd334607a265
Ivan
ivan at 420.am
Thu Nov 17 02:04:37 PST 2016
The branch, FREESIDE_3_BRANCH has been updated
via aacc031f9766621bb5addffeab0fbd334607a265 (commit)
from 26e8adc999712c58cec4f4c3429880f020152731 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit aacc031f9766621bb5addffeab0fbd334607a265
Author: Ivan Kohler <ivan at freeside.biz>
Date: Thu Nov 17 02:04:34 2016 -0800
respect part_svc labels in svc_hardware & svc_cable short service labels, RT#73405
diff --git a/FS/FS/svc_cable.pm b/FS/FS/svc_cable.pm
index 6b4c55b..50236f0 100644
--- a/FS/FS/svc_cable.pm
+++ b/FS/FS/svc_cable.pm
@@ -125,10 +125,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 2be8954..67eca8f 100644
--- a/FS/FS/svc_hardware.pm
+++ b/FS/FS/svc_hardware.pm
@@ -135,15 +135,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);
}
-----------------------------------------------------------------------
Summary of changes:
FS/FS/svc_cable.pm | 4 +++-
FS/FS/svc_hardware.pm | 8 +++++---
2 files changed, 8 insertions(+), 4 deletions(-)
More information about the freeside-commits
mailing list