'name_plural' => 'Hardware',
'display_weight' => 59,
'cancel_weight' => 86,
+ 'manual_require' => 1,
'fields' => {
'svcnum' => { label => 'Service' },
'typenum' => { label => 'Device type',
disable_fixed => 1,
disable_default => 1,
disable_inventory => 1,
+ required => 1,
},
'serial' => { label => 'Serial number', %opts },
'hw_addr' => { label => 'Hardware address', %opts },
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);
}