projects
/
freeside.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
optimize invoice display with sections, RT#80177
[freeside.git]
/
FS
/
FS
/
svc_hardware.pm
diff --git
a/FS/FS/svc_hardware.pm
b/FS/FS/svc_hardware.pm
index
16a5ea9
..
4bff483
100644
(file)
--- 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,
'name_plural' => 'Hardware',
'display_weight' => 59,
'cancel_weight' => 86,
+ 'manual_require' => 1,
'fields' => {
'svcnum' => { label => 'Service' },
'typenum' => { label => 'Device type',
'fields' => {
'svcnum' => { label => 'Service' },
'typenum' => { label => 'Device type',
@@
-83,6
+84,7
@@
sub table_info {
disable_fixed => 1,
disable_default => 1,
disable_inventory => 1,
disable_fixed => 1,
disable_default => 1,
disable_inventory => 1,
+ required => 1,
},
'serial' => { label => 'Serial number', %opts },
'hw_addr' => { label => 'Hardware address', %opts },
},
'serial' => { label => 'Serial number', %opts },
'hw_addr' => { label => 'Hardware address', %opts },
@@
-132,15
+134,22
@@
sub search_sql {
sub label {
my $self = shift;
sub label {
my $self = shift;
+ my $part_svc = $self->cust_svc->part_svc;
my @label = ();
if (my $type = $self->hardware_type) {
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) {
}
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) {
}
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);
}
}
return join(', ', @label);
}