[freeside-commits] branch master updated. 3482a5ad0d9660aa994bb2be61aaa5ae61b1b28d

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


The branch, master has been updated
       via  3482a5ad0d9660aa994bb2be61aaa5ae61b1b28d (commit)
      from  50ccf7c4c7a6416922c95eebea84b547d1235817 (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 3482a5ad0d9660aa994bb2be61aaa5ae61b1b28d
Author: Ivan Kohler <ivan at freeside.biz>
Date:   Thu Nov 17 02:04:30 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