[freeside-commits] freeside/FS/FS Conf.pm, 1.411, 1.412 Record.pm, 1.215, 1.216 Schema.pm, 1.255, 1.256 svc_phone.pm, 1.29, 1.30

Erik Levinson levinse at wavetail.420.am
Sat Dec 25 20:09:28 PST 2010


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

Modified Files:
	Conf.pm Record.pm Schema.pm svc_phone.pm 
Log Message:
added basic LNP capability to svc_phone including SS, RT10948

Index: Schema.pm
===================================================================
RCS file: /home/cvs/cvsroot/freeside/FS/FS/Schema.pm,v
retrieving revision 1.255
retrieving revision 1.256
diff -u -w -d -r1.255 -r1.256
--- Schema.pm	14 Dec 2010 07:29:12 -0000	1.255
+++ Schema.pm	26 Dec 2010 04:09:25 -0000	1.256
@@ -2873,6 +2873,13 @@
         'pbxsvc',           'int', 'NULL',      '', '', '',
         'domsvc',           'int', 'NULL',      '', '', '', 
         'locationnum',      'int', 'NULL', '', '', '',
+        'lnp_status',   'varchar', 'NULL', $char_d, '', '',
+        'portable',   	'char', 'NULL',       1,  '', '', 
+        'lrn',     'char',     'NULL',      10, '', '', 
+	'lnp_desired_due_date',     'int', 'NULL',       '', '', '',
+	'lnp_due_date',     'int', 'NULL',       '', '', '',
+        'lnp_other_provider', 'varchar', 'NULL', $char_d,  '', '',
+        'lnp_other_provider_account', 'varchar', 'NULL', $char_d,  '', '',
       ],
       'primary_key' => 'svcnum',
       'unique' => [],

Index: svc_phone.pm
===================================================================
RCS file: /home/cvs/cvsroot/freeside/FS/FS/svc_phone.pm,v
retrieving revision 1.29
retrieving revision 1.30
diff -u -w -d -r1.29 -r1.30
--- svc_phone.pm	8 Nov 2010 22:04:52 -0000	1.29
+++ svc_phone.pm	26 Dec 2010 04:09:25 -0000	1.30
@@ -97,6 +97,7 @@
 # the new method can be inherited from FS::Record, if a table method is defined
 #
 sub table_info {
+ my %dis2 = ( disable_inventory=>1, disable_select=>1 );
   {
     'name' => 'Phone number',
     'sorts' => 'phonenum',
@@ -134,6 +135,26 @@
                            disable_inventory => 1,
                            disable_select    => 1,
                          },
+	'lnp_status' => {   	label => 'LNP Status',
+				type => 'select-lnp_status.html',
+				%dis2,
+			},
+	'portable' => 	{	label => 'Portable?', %dis2, },
+	'lrn' 	=>	{	label => 'LRN', 
+				disable_inventory => 1, 
+			},
+	'lnp_desired_due_date' =>
+			{ label => 'LNP Desired Due Date', %dis2 },
+	'lnp_due_date' =>
+			{ label => 'LNP Due Date', %dis2 },
+	'lnp_other_provider' =>
+			{ 	label => 'LNP Other Provider', 
+				disable_inventory => 1, 
+			},
+	'lnp_other_provider_account' =>
+			{	label => 'LNP Other Provider Account #', 
+				%dis2 
+			},
     },
   };
 }
@@ -392,6 +413,13 @@
     || $self->ut_foreign_keyn('pbxsvc', 'svc_pbx',    'svcnum' )
     || $self->ut_foreign_keyn('domsvc', 'svc_domain', 'svcnum' )
     || $self->ut_foreign_keyn('locationnum', 'cust_location', 'locationnum')
+    || $self->ut_numbern('lrn')
+    || $self->ut_numbern('lnp_desired_due_date')
+    || $self->ut_numbern('lnp_due_date')
+    || $self->ut_textn('lnp_other_provider')
+    || $self->ut_textn('lnp_other_provider_account')
+    || $self->ut_enumn('lnp_status', ['','portingin','portingout','portedin','native'])
+    || $self->ut_enumn('portable', ['','Y'])
   ;
   return $error if $error;
 

Index: Conf.pm
===================================================================
RCS file: /home/cvs/cvsroot/freeside/FS/FS/Conf.pm,v
retrieving revision 1.411
retrieving revision 1.412
diff -u -w -d -r1.411 -r1.412
--- Conf.pm	24 Dec 2010 00:40:01 -0000	1.411
+++ Conf.pm	26 Dec 2010 04:09:24 -0000	1.412
@@ -3791,6 +3791,13 @@
   },
 
   {
+    'key'         => 'svc_phone-lnp',
+    'section'     => '',
+    'description' => 'Enables Number Portability features for svc_phone',
+    'type'        => 'checkbox',
+  },
+
+  {
     'key'         => 'default_phone_countrycode',
     'section'     => '',
     'description' => 'Default countrcode',

Index: Record.pm
===================================================================
RCS file: /home/cvs/cvsroot/freeside/FS/FS/Record.pm,v
retrieving revision 1.215
retrieving revision 1.216
diff -u -w -d -r1.215 -r1.216
--- Record.pm	25 Nov 2010 01:06:29 -0000	1.215
+++ Record.pm	26 Dec 2010 04:09:24 -0000	1.216
@@ -2589,6 +2589,20 @@
   return "Illegal (enum) field $field: ". $self->getfield($field);
 }
 
+=item ut_enumn COLUMN CHOICES_ARRAYREF
+
+Like ut_enum, except the null value is also allowed.
+
+=cut
+
+sub ut_enumn {
+  my( $self, $field, $choices ) = @_;
+  $self->getfield($field)
+    ? $self->ut_enum($field, $choices)
+    : '';
+}
+
+
 =item ut_foreign_key COLUMN FOREIGN_TABLE FOREIGN_COLUMN
 
 Check/untaint a foreign column key.  Call a regular ut_ method (like ut_number)



More information about the freeside-commits mailing list