[freeside-commits] branch FREESIDE_4_BRANCH updated. 37a23f4ca89d7f18274721f1281df9df9e93701c

Ivan ivan at 420.am
Thu Nov 17 02:04:33 PST 2016


The branch, FREESIDE_4_BRANCH has been updated
       via  37a23f4ca89d7f18274721f1281df9df9e93701c (commit)
      from  765301c50ceefa897cc9541edb46adca568cb692 (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 37a23f4ca89d7f18274721f1281df9df9e93701c
Author: Ivan Kohler <ivan at freeside.biz>
Date:   Thu Nov 17 02:04:32 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 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);
 }

-----------------------------------------------------------------------

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