[freeside-commits] freeside/FS/FS Mason.pm, 1.57, 1.58 Schema.pm, 1.244, 1.245 qual.pm, NONE, 1.1 qual_option.pm, NONE, 1.1 svc_dsl.pm, NONE, 1.1

Erik Levinson levinse at wavetail.420.am
Mon Nov 22 12:53:24 PST 2010


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

Modified Files:
	Mason.pm Schema.pm 
Added Files:
	qual.pm qual_option.pm svc_dsl.pm 
Log Message:
initial commit of svc_dsl, qual, and qual_option - schema and new modules which do nothing 
currently, RT7111


Index: Schema.pm
===================================================================
RCS file: /home/cvs/cvsroot/freeside/FS/FS/Schema.pm,v
retrieving revision 1.244
retrieving revision 1.245
diff -u -w -d -r1.244 -r1.245
--- Schema.pm	13 Nov 2010 23:23:47 -0000	1.244
+++ Schema.pm	22 Nov 2010 20:53:21 -0000	1.245
@@ -906,6 +906,9 @@
         'zip',         'varchar', 'NULL',      10, '', '', 
         'country',        'char',     '',       2, '', '', 
         'geocode',     'varchar', 'NULL',      20, '', '',
+        'location_type',     'varchar', 'NULL',      20, '', '',
+        'location_number',     'varchar', 'NULL',      20, '', '',
+        'location_kind',     'char', 'NULL',      1, '', '',
       ],
       'primary_key' => 'locationnum',
       'unique'      => [],
@@ -1675,6 +1678,32 @@
       'index' => [ [ 'npa', 'nxx' ], [ 'popnum' ] ],
     },
 
+    'qual' => {
+      'columns' => [
+        'qualnum',  'serial',     '',     '', '', '', 
+        'contactnum',    'int',     '',     '', '', '',
+	'svctn',     'int', 'NULL',       '', '', '',
+        'svcdb',      'varchar', '', $char_d, '', '', 
+        'vendor_qual_id',      'varchar', 'NULL', $char_d, '', '', 
+        'status',      'char', '', 1, '', '', 
+      ],
+      'primary_key' => 'qualnum',
+      'unique' => [],
+      'index' => [ [ 'contactnum' ] ],
+    },
+    
+    'qual_option' => {
+      'columns' => [
+        'optionnum', 'serial', '', '', '', '', 
+        'qualnum',  'int',     '',     '', '', '', 
+        'optionname', 'varchar', '', $char_d, '', '', 
+        'optionvalue', 'text', 'NULL', '', '', '', 
+      ],
+      'primary_key' => 'optionnum',
+      'unique' => [],
+      'index' => [],
+    },
+
     'svc_acct' => {
       'columns' => [
         'svcnum',    'int',    '',   '', '', '', 
@@ -1804,6 +1833,39 @@
       'index' => [ ['domain'] ],
     },
 
+    'svc_dsl' => {
+      'columns' => [
+        'svcnum',           'int',    '',        '', '', '',
+	'pushed',     'int', 'NULL',       '', '', '',
+	'desired_dd',     'int', '',       '', '', '',
+	'dd',     'int', 'NULL',       '', '', '',
+        'vendor_order_id',              'varchar', 'NULL', $char_d,  '', '',
+        'vendor_qual_id',              'varchar', 'NULL', $char_d,  '', '',
+        'vendor_order_type',   'char', '',       1,  '', '', 
+        'vendor_order_status',   'char', 'NULL',       1,  '', '', 
+        'first',              'varchar', '', $char_d,  '', '',
+        'last',              'varchar', '', $char_d,  '', '',
+        'company',              'varchar', 'NULL', $char_d,  '', '',
+	'svctn',     'int', 'NULL',       '', '', '',
+        'loop_type',   'char', 'NULL',       1,  '', '', 
+        'lvp',              'varchar', 'NULL', $char_d,  '', '',
+        'cktnum',              'varchar', 'NULL', $char_d,  '', '',
+        'rate_band',              'varchar', 'NULL', $char_d,  '', '',
+        'isp_chg',   'char', 'NULL',       1,  '', '', 
+        'isp_prev',              'varchar', 'NULL', $char_d,  '', '',
+        'username',              'varchar', 'NULL', $char_d,  '', '',
+        'password',              'varchar', 'NULL', $char_d,  '', '',
+        'staticips',             'text', 'NULL', '',  '', '',
+        'monitored',   	'char', '',       1,  '', '', 
+	'last_pull',     'int', 'NULL',       '', '', '',
+	'notes',     'text', 'NULL',       '', '', '',
+      ],
+      'primary_key' => 'svcnum',
+      'unique' => [ ],
+      'index' => [ ['svctn'] ],
+    },
+
+
     'domain_record' => {
       'columns' => [
         'recnum',    'serial',     '',  '', '', '', 

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

use strict;
use base qw( FS::Record );
use FS::Record qw( qsearch qsearchs );

=head1 NAME

FS::qual - Object methods for qual records

=head1 SYNOPSIS

  use FS::qual;

  $record = new FS::qual \%hash;
  $record = new FS::qual { 'column' => 'value' };

  $error = $record->insert;

  $error = $new_record->replace($old_record);

  $error = $record->delete;

  $error = $record->check;

=head1 DESCRIPTION

An FS::qual object represents a qualification for service.  FS::qual inherits from
FS::Record.  The following fields are currently supported:

=over 4

=item qualnum - primary key

=item contactnum - Contact (Prospect/Customer) - see L<FS::contact>

=item svctn - Service Telephone Number

=item svcdb - table used for this service.  See L<FS::svc_dsl> and
L<FS::svc_broadband>, among others.

=item vendor_qual_id - qualification id from vendor/telco

=item status - qualification status (e.g. (N)ew, (P)ending, (Q)ualifies)


=back

=head1 METHODS

=over 4

=item new HASHREF

Creates a new qualification.  To add the qualification to the database, see L<"insert">.

Note that this stores the hash reference, not a distinct copy of the hash it
points to.  You can ask the object for a copy with the I<hash> method.

=cut

# the new method can be inherited from FS::Record, if a table method is defined

sub table { 'qual'; }

=item insert

Adds this record to the database.  If there is an error, returns the error,
otherwise returns false.

=cut

# the insert method can be inherited from FS::Record

=item delete

Delete this record from the database.

=cut

# the delete method can be inherited from FS::Record

=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 qualification.  If there is
an error, returns the error, otherwise returns false.  Called by the insert
and replace methods.

=cut

# the check method should currently be supplied - FS::Record contains some
# data checking routines

sub check {
  my $self = shift;

  my $error = 
    $self->ut_numbern('qualnum')
    || $self->ut_number('contactnum')
    || $self->ut_numbern('svctn')
    || $self->ut_alpha('svcdb')
    || $self->ut_textn('vendor_qual_id')
    || $self->ut_alpha('status')
  ;
  return $error if $error;

  $self->SUPER::check;
}

=back

=head1 BUGS

This doesn't do anything yet.

=head1 SEE ALSO

L<FS::Record>, schema.html from the base documentation.

=cut

1;


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

use strict;
use base qw( FS::Record );
use FS::Record qw( qsearch qsearchs );
use FS::qual;

=head1 NAME

FS::qual_option - Object methods for qual_option records

=head1 SYNOPSIS

  use FS::qual_option;

  $record = new FS::qual_option \%hash;
  $record = new FS::qual_option { 'column' => 'value' };

  $error = $record->insert;

  $error = $new_record->replace($old_record);

  $error = $record->delete;

  $error = $record->check;

=head1 DESCRIPTION

An FS::qual_option object represents a qualification option. 
FS::qual_option inherits from FS::Record.  The following fields are currently
supported:

=over 4

=item optionnum - primary key

=item qualnum - qualification (see L<FS::qual>)

=item optionname - option name

=item optionvalue - option value


=back

=head1 METHODS

=over 4

=item new HASHREF

Creates a new qualification option. To add the qualification option to the
database, see L<"insert">.

Note that this stores the hash reference, not a distinct copy of the hash it
points to.  You can ask the object for a copy with the I<hash> method.

=cut

# the new method can be inherited from FS::Record, if a table method is defined

sub table { 'qual_option'; }

=item insert

Adds this record to the database.  If there is an error, returns the error,
otherwise returns false.

=cut

# the insert method can be inherited from FS::Record

=item delete

Delete this record from the database.

=cut

# the delete method can be inherited from FS::Record

=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 qualification option.  If there
is an error, returns the error, otherwise returns false.  Called by the insert
and replace methods.

=cut

# the check method should currently be supplied - FS::Record contains some
# data checking routines

sub check {
  my $self = shift;

  my $error = 
    $self->ut_numbern('optionnum')
    || $self->ut_foreign_key('qualnum', 'qual', 'qualnum')
    || $self->ut_alpha('optionname')
    || $self->ut_textn('optionvalue')
  ;
  return $error if $error;

  $self->SUPER::check;
}

=back

=head1 BUGS

This doesn't do anything yet.

=head1 SEE ALSO

L<FS::qual>, L<FS::Record>, schema.html from the base documentation.

=cut

1;


Index: Mason.pm
===================================================================
RCS file: /home/cvs/cvsroot/freeside/FS/FS/Mason.pm,v
retrieving revision 1.57
retrieving revision 1.58
diff -u -w -d -r1.57 -r1.58
--- Mason.pm	7 Nov 2010 00:56:34 -0000	1.57
+++ Mason.pm	22 Nov 2010 20:53:21 -0000	1.58
@@ -258,6 +258,9 @@
   use FS::acct_snarf;
   use FS::part_pkg_discount;
   use FS::svc_cert;
+  use FS::svc_dsl;
+  use FS::qual;
+  use FS::qual_option;
   # Sammath Naur
 
   if ( $FS::Mason::addl_handler_use ) {

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

use strict;
use vars qw( @ISA $conf $DEBUG $me );
use FS::Record qw( qsearch qsearchs );
use FS::svc_Common;

@ISA = qw( FS::svc_Common );
$DEBUG = 0;
$me = '[FS::svc_dsl]';

FS::UID->install_callback( sub { 
  $conf = new FS::Conf;
}
);

=head1 NAME

FS::svc_dsl - Object methods for svc_dsl records

=head1 SYNOPSIS

  use FS::svc_dsl;

  $record = new FS::svc_dsl \%hash;
  $record = new FS::svc_dsl { 'column' => 'value' };

  $error = $record->insert;

  $error = $new_record->replace($old_record);

  $error = $record->delete;

  $error = $record->check;
  
  $error = $record->suspend;

  $error = $record->unsuspend;

  $error = $record->cancel;

=head1 DESCRIPTION

An FS::svc_dsl object represents a DSL service.  FS::svc_dsl inherits from
FS::svc_Common.  The following fields are currently supported:

=over 4

=item svcnum

Primary key (assigned automatcially for new DSL))

=item pushed

Time the DSL order was pushed to a vendor, if exporting orders to a vendor/telco

=item desired_dd

Desired Due Date

=item dd

Due Date (e.g. once order is in Assigned status or similar by the telco)

=item vendor_order_id

Vendor/telco DSL order #

=item vendor_order_type

Vendor/telco DSL order type (e.g. (M)ove, (A)dd, (C)hange, (D)elete, or similar)

=item vendor_order_status

Vendor/telco DSL order status (e.g. (N)ew, (A)ssigned, (R)ejected, (M)revised,
(C)ompleted, (X)cancelled, or similar)

=item first

End-user first name

=item last

End-user last name

=item company

End-user company name

=item svctn

DSL Telephone Number

=item loop_type

Loop-type - vendor/telco-specific

=item lvp

Local Voice Provider's name

=item cktnum

Circuit #

=item rate_band

Rate Band

=item isp_chg

=item isp_prev

=item staticips

=item vendor_qual_id

Ikano-specific fields, do not use otherwise

=item username

If outsourced PPPoE/RADIUS, username

=item password

If outsourced PPPoE/RADIUS, password

=item monitored

Order is monitored (auto-pull/sync), either Y or blank

=item last_pull

Time of last data pull from vendor/telco

=item notes

DSL order notes placed by staff or vendor/telco on the vendor/telco order


=back

=head1 METHODS

=over 4

=item new HASHREF

Creates a new DSL.  To add the DSL to the database, see L<"insert">.

Note that this stores the hash reference, not a distinct copy of the hash it
points to.  You can ask the object for a copy with the I<hash> method.

=cut

# the new method can be inherited from FS::Record, if a table method is defined

sub table { 'svc_dsl'; }

=item insert

Adds this record to the database.  If there is an error, returns the error,
otherwise returns false.

=cut

# the insert method can be inherited from FS::Record

=item delete

Delete this record from the database.

=cut

# the delete method can be inherited from FS::Record

=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 DSL.  If there is
an error, returns the error, otherwise returns false.  Called by the insert
and replace methods.

=cut

# the check method should currently be supplied - FS::Record contains some
# data checking routines

sub check {
  my $self = shift;

  my $error = 
    $self->ut_numbern('svcnum')
    || $self->ut_numbern('pushed')
    || $self->ut_number('desired_dd')
    || $self->ut_numbern('dd')
    || $self->ut_textn('vendor_order_id')
    || $self->ut_textn('vendor_qual_id')
    || $self->ut_alpha('vendor_order_type')
    || $self->ut_alphan('vendor_order_status')
    || $self->ut_text('first')
    || $self->ut_text('last')
    || $self->ut_textn('company')
    || $self->ut_numbern('svctn')
    || $self->ut_alphasn('loop_type')
    || $self->ut_textn('lvp')
    || $self->ut_textn('cktnum')
    || $self->ut_textn('rate_band')
    || $self->ut_alphan('isp_chg')
    || $self->ut_textn('isp_prev')
    || $self->ut_textn('username')
    || $self->ut_textn('password')
    || $self->ut_textn('staticips')
    || $self->ut_enum('monitored',    [ '', 'Y' ])
    || $self->ut_numbern('last_pull')
    || $self->ut_textn('notes')
  ;
  return $error if $error;

  $self->SUPER::check;
}

=back

=head1 BUGS

This doesn't do anything yet.

=head1 SEE ALSO

L<FS::svc_Common>, edit/part_svc.cgi from an installed web interface,
export.html from the base documentation, L<FS::Record>, L<FS::Conf>,
L<FS::cust_svc>, L<FS::part_svc>, L<FS::cust_pkg>, L<FS::queue>,
L<freeside-queued>, schema.html from the base documentation.

=cut

1;




More information about the freeside-commits mailing list