[freeside-commits] freeside/FS/FS Conf.pm, 1.397.2.11, 1.397.2.12 Record.pm, 1.214.2.1, 1.214.2.2 Schema.pm, 1.239.2.6, 1.239.2.7 svc_phone.pm, 1.28.2.1, 1.28.2.2
Erik Levinson
levinse at wavetail.420.am
Sat Dec 25 20:09:37 PST 2010
Update of /home/cvs/cvsroot/freeside/FS/FS
In directory wavetail.420.am:/tmp/cvs-serv29725/FS/FS
Modified Files:
Tag: FREESIDE_2_1_BRANCH
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.239.2.6
retrieving revision 1.239.2.7
diff -u -w -d -r1.239.2.6 -r1.239.2.7
--- Schema.pm 10 Dec 2010 22:09:06 -0000 1.239.2.6
+++ Schema.pm 26 Dec 2010 04:09:33 -0000 1.239.2.7
@@ -2771,6 +2771,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.28.2.1
retrieving revision 1.28.2.2
diff -u -w -d -r1.28.2.1 -r1.28.2.2
--- svc_phone.pm 8 Nov 2010 22:04:53 -0000 1.28.2.1
+++ svc_phone.pm 26 Dec 2010 04:09:34 -0000 1.28.2.2
@@ -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.397.2.11
retrieving revision 1.397.2.12
diff -u -w -d -r1.397.2.11 -r1.397.2.12
--- Conf.pm 24 Dec 2010 00:41:24 -0000 1.397.2.11
+++ Conf.pm 26 Dec 2010 04:09:32 -0000 1.397.2.12
@@ -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.214.2.1
retrieving revision 1.214.2.2
diff -u -w -d -r1.214.2.1 -r1.214.2.2
--- Record.pm 25 Nov 2010 01:06:38 -0000 1.214.2.1
+++ Record.pm 26 Dec 2010 04:09:33 -0000 1.214.2.2
@@ -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