[freeside-commits] freeside/FS/FS Conf.pm, 1.468.2.27, 1.468.2.28 svc_Tower_Mixin.pm, NONE, 1.1.2.2 svc_acct.pm, 1.317.2.4, 1.317.2.5 svc_broadband.pm, 1.24.2.7, 1.24.2.8 Schema.pm, 1.317.2.24, 1.317.2.25

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


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

Modified Files:
      Tag: FREESIDE_2_3_BRANCH
	Conf.pm svc_acct.pm svc_broadband.pm Schema.pm 
Added Files:
      Tag: FREESIDE_2_3_BRANCH
	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.317.2.24
retrieving revision 1.317.2.25
diff -u -w -d -r1.317.2.24 -r1.317.2.25
--- Schema.pm	18 Dec 2011 01:11:45 -0000	1.317.2.24
+++ Schema.pm	19 Dec 2011 01:59:16 -0000	1.317.2.25
@@ -1895,6 +1895,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, '', '', 
@@ -2537,6 +2538,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.468.2.27
retrieving revision 1.468.2.28
diff -u -w -d -r1.468.2.27 -r1.468.2.28
--- Conf.pm	9 Dec 2011 05:09:20 -0000	1.468.2.27
+++ Conf.pm	19 Dec 2011 01:59:15 -0000	1.468.2.28
@@ -4720,13 +4720,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.317.2.4
retrieving revision 1.317.2.5
diff -u -w -d -r1.317.2.4 -r1.317.2.5
--- svc_acct.pm	13 Dec 2011 20:21:31 -0000	1.317.2.4
+++ svc_acct.pm	19 Dec 2011 01:59:16 -0000	1.317.2.5
@@ -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.24.2.7
retrieving revision 1.24.2.8
diff -u -w -d -r1.24.2.7 -r1.24.2.8
--- svc_broadband.pm	13 Dec 2011 05:10:21 -0000	1.24.2.7
+++ svc_broadband.pm	19 Dec 2011 01:59:16 -0000	1.24.2.8
@@ -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;
@@ -488,16 +488,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