projects
/
freeside.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
RT# 78356 - made status bar more responsive on export. Changed svc update to only...
[freeside.git]
/
FS
/
FS
/
svc_hardware.pm
diff --git
a/FS/FS/svc_hardware.pm
b/FS/FS/svc_hardware.pm
index
16a5ea9
..
019a564
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);
}
@@
-236,6
+245,17
@@
sub display_hw_addr {
join(':', $self->hw_addr =~ /../g) : $self->hw_addr)
}
join(':', $self->hw_addr =~ /../g) : $self->hw_addr)
}
+sub _upgrade_data {
+
+ require FS::Misc::FixIPFormat;
+ FS::Misc::FixIPFormat::fix_bad_addresses_in_table(
+ 'svc_hardware', 'svcnum', 'ip_addr',
+ );
+
+ '';
+
+}
+
=back
=head1 SEE ALSO
=back
=head1 SEE ALSO
@@
-245,4
+265,3
@@
L<FS::Record>, L<FS::svc_Common>, schema.html from the base documentation.
=cut
1;
=cut
1;
-