X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=FS%2FFS%2Fsvc_hardware.pm;h=4bff483e1559b1e66b9fbbbd7ca85c99053367e9;hb=2a56c671635687bf2648eb3a7cf4bce228101af3;hp=16a5ea99c7e2ac8570b9f9bb8814ce5dff66cf0f;hpb=66c1457c1820264d0dce794f42cf20be768c6dc3;p=freeside.git diff --git a/FS/FS/svc_hardware.pm b/FS/FS/svc_hardware.pm index 16a5ea99c..4bff483e1 100644 --- a/FS/FS/svc_hardware.pm +++ b/FS/FS/svc_hardware.pm @@ -75,6 +75,7 @@ sub table_info { 'name_plural' => 'Hardware', 'display_weight' => 59, 'cancel_weight' => 86, + 'manual_require' => 1, 'fields' => { 'svcnum' => { label => 'Service' }, 'typenum' => { label => 'Device type', @@ -83,6 +84,7 @@ sub table_info { disable_fixed => 1, disable_default => 1, disable_inventory => 1, + required => 1, }, 'serial' => { label => 'Serial number', %opts }, 'hw_addr' => { label => 'Hardware address', %opts }, @@ -132,15 +134,22 @@ 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; + 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, '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, '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); }