[freeside-commits] freeside/FS/FS Conf.pm, 1.495, 1.496 svc_Tower_Mixin.pm, NONE, 1.1 svc_acct.pm, 1.321, 1.322 svc_broadband.pm, 1.31, 1.32 Schema.pm, 1.344, 1.345

Ivan,,, ivan at wavetail.420.am
Sun Dec 18 17:59:17 PST 2011


Update of /home/cvs/cvsroot/freeside/FS/FS
In directory wavetail.420.am:/tmp/cvs-serv28608/FS/FS

Modified Files:
	Conf.pm svc_acct.pm svc_broadband.pm Schema.pm 
Added Files:
	svc_Tower_Mixin.pm 
Log Message:
tower for svc_acct, RT#15538

Index: Schema.pm
===================================================================
RCS file: /home/cvs/cvsroot/freeside/FS/FS/Schema.pm,v
retrieving revision 1.344
retrieving revision 1.345
diff -u -w -d -r1.344 -r1.345
--- Schema.pm	18 Dec 2011 01:11:43 -0000	1.344
+++ Schema.pm	19 Dec 2011 01:59:14 -0000	1.345
@@ -1892,6 +1892,7 @@
         '_password_encoding', 'varchar', 'NULL', $char_d, '', '',
         'sec_phrase', 'varchar',  'NULL',   $char_d, '', '', 
         'popnum',    'int',    'NULL',   '', '', '', 
+        'sectornum', 'int', 'NULL',      '', '', '',
         'uid',       'int', 'NULL',   '', '', '', 
         'gid',       'int', 'NULL',   '', '', '', 
         'finger',    'varchar',   'NULL',   2*$char_d, '', '', 
@@ -2534,6 +2535,10 @@
         #'agentnum',      'int', 'NULL',      '', '', '',
         'towername', 'varchar',     '', $char_d, '', '',
         'disabled',     'char', 'NULL',       1, '', '',
+        'latitude', 'decimal', 'NULL',   '10,7', '', '', 
+        'longitude','decimal', 'NULL',   '10,7', '', '', 
+        'altitude', 'decimal', 'NULL',       '', '', '', 
+        'coord_auto',  'char', 'NULL',        1, '', '',
       ],
       'primary_key' => 'towernum',
       'unique'      => [ [ 'towername' ] ], # , 'agentnum' ] ],

Index: Conf.pm
===================================================================
RCS file: /home/cvs/cvsroot/freeside/FS/FS/Conf.pm,v
retrieving revision 1.495
retrieving revision 1.496
diff -u -w -d -r1.495 -r1.496
--- Conf.pm	13 Dec 2011 05:09:29 -0000	1.495
+++ Conf.pm	19 Dec 2011 01:59:14 -0000	1.496
@@ -4735,13 +4735,17 @@
   {
     'key'         => 'translate-auto-insert',
     'section'     => '',
-    'description' => 'Auto-insert untranslated strings for selected non-en_US locales with their default/en_US values. DO NOT TURN THIS ON.',
-    'type'        => 'select-sub',
+    'description' => 'Auto-insert untranslated strings for selected non-en_US locales with their default/en_US values.  Do not turn this on unless translating the interface into a new language.',
+    'type'        => 'select',
     'multiple'    => 1,
-    'options_sub' => sub { map { $_ => '' } 
-                            grep { $_ ne 'en_US' } FS::Locales::locales;
+    'select_enum' => [ grep { $_ ne 'en_US' } FS::Locales::locales ],
 			             },
-    'option_sub'  => sub { ''; },
+
+  {
+    'key'         => 'svc_acct-tower_sector',
+    'section'     => '',
+    'description' => 'Track tower and sector for svc_acct (account) services.',
+    'type'        => 'checkbox',
   },
 
   { key => "apacheroot", section => "deprecated", description => "<b>DEPRECATED</b>", type => "text" },

Index: svc_acct.pm
===================================================================
RCS file: /home/cvs/cvsroot/freeside/FS/FS/svc_acct.pm,v
retrieving revision 1.321
retrieving revision 1.322
diff -u -w -d -r1.321 -r1.322
--- svc_acct.pm	19 Dec 2011 01:24:48 -0000	1.321
+++ svc_acct.pm	19 Dec 2011 01:59:14 -0000	1.322
@@ -5,6 +5,7 @@
              FS::svc_CGP_Mixin
              FS::svc_CGPRule_Mixin
              FS::svc_Radius_Mixin
+             FS::svc_Tower_Mixin
              FS::svc_Common );
 use vars qw( $DEBUG $me $conf $skip_fuzzyfiles
              $dir_prefix @shells $usernamemin
@@ -53,6 +54,7 @@
 use FS::svc_www;
 use FS::cdr;
 use FS::acct_snarf;
+use FS::tower_sector;
 
 $DEBUG = 0;
 $me = '[FS::svc_acct]';
@@ -338,6 +340,7 @@
                          disable_inventory => 1,
                          disable_select => 1, #UI wonky, pry works otherwise
                        },
+        'sectornum' => 'Tower sector',
         'usergroup' => {
                          label => 'RADIUS groups',
                          type  => 'select-radius_group.html',
@@ -1122,6 +1125,7 @@
               #|| $self->ut_number('domsvc')
               || $self->ut_foreign_key( 'domsvc', 'svc_domain', 'svcnum' )
               || $self->ut_foreign_keyn('pbxsvc', 'svc_pbx',    'svcnum' )
+              || $self->ut_foreign_keyn('sectornum','tower_sector','sectornum')
               || $self->ut_textn('sec_phrase')
               || $self->ut_snumbern('seconds')
               || $self->ut_snumbern('upbytes')

Index: svc_broadband.pm
===================================================================
RCS file: /home/cvs/cvsroot/freeside/FS/FS/svc_broadband.pm,v
retrieving revision 1.31
retrieving revision 1.32
diff -u -w -d -r1.31 -r1.32
--- svc_broadband.pm	13 Dec 2011 05:09:30 -0000	1.31
+++ svc_broadband.pm	19 Dec 2011 01:59:14 -0000	1.32
@@ -10,7 +10,7 @@
 use FS::part_svc_router;
 use FS::tower_sector;
 
- at ISA = qw( FS::svc_Radius_Mixin FS::svc_Common );
+ at ISA = qw( FS::svc_Radius_Mixin FS::svc_Tower_Mixin FS::svc_Common );
 
 $FS::UID::callback{'FS::svc_broadband'} = sub { 
   $conf = new FS::Conf;
@@ -489,16 +489,6 @@
   new NetAddr::IP ($self->ip_addr);
 }
 
-=item tower_sector
-
-=cut
-
-sub tower_sector {
-  my $self = shift;
-  return '' unless $self->sectornum;
-  qsearchs('tower_sector', { sectornum => $self->sectornum });
-}
-
 =item addr_block
 
 Returns the FS::addr_block record (i.e. the address block) for this broadband service.

--- NEW FILE: svc_Tower_Mixin.pm ---
package FS::svc_Tower_Mixin;

use strict;
use FS::Record qw(qsearchs); #qsearch;
use FS::tower_sector;

=item tower_sector

=cut

sub tower_sector {
  my $self = shift;
  return '' unless $self->sectornum;
  qsearchs('tower_sector', { sectornum => $self->sectornum });
}

1;



More information about the freeside-commits mailing list