summaryrefslogtreecommitdiff
path: root/FS/FS/svc_fiber.pm
diff options
context:
space:
mode:
authorMark Wells <mark@freeside.biz>2016-03-10 01:20:21 -0800
committerMark Wells <mark@freeside.biz>2016-03-10 01:20:49 -0800
commit5a9a411b980edea1b0f9690fc92e3b93574ee974 (patch)
treeef7133da8ea9bf680c6b9a5913dba44cff6191a5 /FS/FS/svc_fiber.pm
parentefad6767531821f6796e193a53aed4d2981cb983 (diff)
add svc_fiber circuit id field, OLT sites, and other improvements, #35260
Diffstat (limited to 'FS/FS/svc_fiber.pm')
-rw-r--r--FS/FS/svc_fiber.pm18
1 files changed, 13 insertions, 5 deletions
diff --git a/FS/FS/svc_fiber.pm b/FS/FS/svc_fiber.pm
index c4036dc..c604943 100644
--- a/FS/FS/svc_fiber.pm
+++ b/FS/FS/svc_fiber.pm
@@ -108,6 +108,13 @@ sub table_info {
'disable_inventory' => 1,
'disable_select' => 1,
},
+ # ODN circuit
+ 'circuit_id' => {
+ 'label' => 'ODN circuit',
+ 'type' => 'input-fiber_circuit',
+ 'disable_inventory' => 1,
+ 'disable_select' => 1,
+ },
# ONT stuff
'ont_id' => {
'label' => 'ONT #',
@@ -180,15 +187,14 @@ sub search_sql {
=item label
-Returns a description of this fiber service containing the OLT name and
-port location, and the ONT serial number.
+Returns a description of this fiber service containing the circuit ID
+and the ONT serial number.
=cut
sub label {
my $self = shift;
- $self->ont_serial . ' @ ' . $self->fiber_olt->oltname . ' ' .
- join('-', $self->shelf, $self->card, $self->olt_port);
+ $self->ont_serial . ' @ ' . $self->circuit_id;
}
# nothing special for insert, delete, or replace
@@ -247,13 +253,15 @@ sub check {
|| $self->ut_alphan('ont_serial')
|| $self->ut_alphan('ont_port')
|| $self->ut_numbern('vlan')
- || $self->ut_snumbern('signal')
+ || $self->ut_sfloatn('signal')
|| $self->ut_numbern('speed_up')
|| $self->ut_numbern('speed_down')
|| $self->ut_textn('ont_install')
;
return $error if $error;
+ $self->set('signal', sprintf('%.2f', $self->get('signal')));
+
$self->SUPER::check;
}