add skip_dcontext_suffix to skip CDRs with dcontext ending in a definable string...
[freeside.git] / FS / FS / tower.pm
index 227e3eb..f371ec9 100644 (file)
@@ -1,10 +1,10 @@
 package FS::tower;
 package FS::tower;
+use base qw( FS::o2m_Common FS::Record );
 
 use strict;
 
 use strict;
-use base qw( FS::o2m_Common FS::Record );
+use List::Util qw( max );
 use FS::Record qw( qsearch qsearchs );
 use FS::tower_sector;
 use FS::Record qw( qsearch qsearchs );
 use FS::tower_sector;
-use List::Util qw( max );
 
 =head1 NAME
 
 
 =head1 NAME
 
@@ -59,8 +59,6 @@ points to.  You can ask the object for a copy with the I<hash> method.
 
 =cut
 
 
 =cut
 
-# the new method can be inherited from FS::Record, if a table method is defined
-
 sub table { 'tower'; }
 
 =item insert
 sub table { 'tower'; }
 
 =item insert
@@ -68,23 +66,15 @@ sub table { 'tower'; }
 Adds this record to the database.  If there is an error, returns the error,
 otherwise returns false.
 
 Adds this record to the database.  If there is an error, returns the error,
 otherwise returns false.
 
-=cut
-
 =item delete
 
 Delete this record from the database.
 
 =item delete
 
 Delete this record from the database.
 
-=cut
-
 =item replace OLD_RECORD
 
 Replaces the OLD_RECORD with this one in the database.  If there is an error,
 returns the error, otherwise returns false.
 
 =item replace OLD_RECORD
 
 Replaces the OLD_RECORD with this one in the database.  If there is an error,
 returns the error, otherwise returns false.
 
-=cut
-
-# the replace method can be inherited from FS::Record
-
 =item check
 
 Checks all fields to make sure this is a valid tower.  If there is
 =item check
 
 Checks all fields to make sure this is a valid tower.  If there is
@@ -93,9 +83,6 @@ and replace methods.
 
 =cut
 
 
 =cut
 
-# the check method should currently be supplied - FS::Record contains some
-# data checking routines
-
 sub check {
   my $self = shift;
 
 sub check {
   my $self = shift;
 
@@ -103,6 +90,13 @@ sub check {
     $self->ut_numbern('towernum')
     || $self->ut_text('towername')
     || $self->ut_enum('disabled', [ '', 'Y' ])
     $self->ut_numbern('towernum')
     || $self->ut_text('towername')
     || $self->ut_enum('disabled', [ '', 'Y' ])
+    || $self->ut_coordn('latitude')
+    || $self->ut_coordn('longitude')
+    || $self->ut_enum('coord_auto', [ '', 'Y' ])
+    || $self->ut_floatn('altitude')
+    || $self->ut_floatn('height')
+    || $self->ut_floatn('veg_height')
+    || $self->ut_alphan('color')
   ;
   return $error if $error;
 
   ;
   return $error if $error;