L<FS::svc_acct_pop> - POP (Point of Presence, not Post
Office Protocol) class
+L<FS::part_pop_local> - Local calling area class
+
L<FS::part_referral> - Referral class
L<FS::cust_main_county> - Locale (tax rate) class
=head1 VERSION
-$Id: FS.pm,v 1.8 2001-09-11 00:08:18 ivan Exp $
+$Id: FS.pm,v 1.9 2001-09-26 09:17:06 ivan Exp $
=head1 SUPPORT
=head1 VERSION
-$Id: cust_credit_bill.pm,v 1.5 2001-09-11 00:08:18 ivan Exp $
+$Id: cust_credit_bill.pm,v 1.6 2001-09-26 09:17:06 ivan Exp $
=head1 BUGS
=head1 SEE ALSO
-L<FS::Record>, L<FS::cust_refund>, L<FS::cust_bill>, L<cust_credit>,
+L<FS::Record>, L<FS::cust_refund>, L<FS::cust_bill>, L<FS::cust_credit>,
schema.html from the base documentation.
=cut
late notices on those invoices. The default is now. It is specified as a UNIX timestamp; see L<perlfunc/"time">). Also see L<Time::Local> and L<Date::Parse>
for conversion functions.
-batch_card - Set this true to batch cards (see L<cust_pay_batch>). By
+batch_card - Set this true to batch cards (see L<FS::cust_pay_batch>). By
default, cards are processed immediately, which will generate an error if
CyberCash is not installed.
=head1 VERSION
-$Id: cust_main.pm,v 1.37 2001-09-25 18:03:04 ivan Exp $
+$Id: cust_main.pm,v 1.38 2001-09-26 09:17:06 ivan Exp $
=head1 BUGS
--- /dev/null
+package FS::part_pop_local;
+
+use strict;
+use vars qw( @ISA );
+use FS::Record; # qw( qsearchs );
+
+@ISA = qw( FS::Record );
+
+=head1 NAME
+
+FS::part_pop_local - Object methods for part_pop_local records
+
+=head1 SYNOPSIS
+
+ use FS::part_pop_local;
+
+ $record = new FS::part_pop_local \%hash;
+ $record = new FS::part_pop_local { 'column' => 'value' };
+
+ $error = $record->insert;
+
+ $error = $new_record->replace($old_record);
+
+ $error = $record->delete;
+
+ $error = $record->check;
+
+=head1 DESCRIPTION
+
+An FS::part_pop_local object represents a local call area. Each
+FS::part_pop_local record maps a NPA/NXX (area code and exchange) to the POP
+(see L<FS::svc_acct_pop>) which is a local call. FS::part_pop_local inherits
+from FS::Record. The following fields are currently supported:
+
+=over 4
+
+=item localnum - primary key (assigned automatically for new accounts)
+
+=item popnum - see L<FS::svc_acct_pop>
+
+=item city
+
+=item state
+
+=item npa - area code
+
+=item nxx - exchange
+
+=back
+
+=head1 METHODS
+
+=over 4
+
+=item new HASHREF
+
+Creates a new point of presence (if only it were that easy!). To add the
+point of presence to the database, see L<"insert">.
+
+=cut
+
+sub table { 'part_pop_local'; }
+
+=item insert
+
+Adds this point of presence to the database. If there is an error, returns the
+error, otherwise returns false.
+
+=item delete
+
+Removes this point of presence from the database.
+
+=item replace OLD_RECORD
+
+Replaces OLD_RECORD with this one in the database. If there is an error,
+returns the error, otherwise returns false.
+
+=item check
+
+Checks all fields to make sure this is a valid point of presence. If there is
+an error, returns the error, otherwise returns false. Called by the insert
+and replace methods.
+
+=cut
+
+sub check {
+ my $self = shift;
+
+ $self->ut_numbern('localnum')
+ or $self->ut_numbern('popnum')
+ or $self->ut_text('city')
+ or $self->ut_text('state')
+ or $self->ut_number('npa')
+ or $self->ut_number('nxx')
+ ;
+
+}
+
+=back
+
+=head1 VERSION
+
+$Id: part_pop_local.pm,v 1.1 2001-09-26 09:17:06 ivan Exp $
+
+=head1 BUGS
+
+US/CA-centric.
+
+=head1 SEE ALSO
+
+L<FS::Record>, L<FS::svc_acct_pop>, schema.html from the base documentation.
+
+=cut
+
+1;
+
=head1 VERSION
-$Id: svc_acct_pop.pm,v 1.2 2000-01-28 22:55:06 ivan Exp $
+$Id: svc_acct_pop.pm,v 1.3 2001-09-26 09:17:06 ivan Exp $
=head1 BUGS
=head1 SEE ALSO
-L<FS::Record>, L<svc_acct>, schema.html from the base documentation.
+L<FS::Record>, L<FS::svc_acct>, L<FS::part_pop_local>, schema.html from the
+base documentation.
=cut
FS/cust_credit_refund.pm
FS/cust_svc.pm
FS/part_pkg.pm
+FS/part_pop_local.pm
FS/part_referral.pm
FS/part_svc.pm
FS/part_svc_column.pm
t/domain_record.t
t/nas.t
t/part_pkg.t
+t/part_pop_local.t
t/part_referral.t
t/part_svc.t
t/part_svc_column.t
--- /dev/null
+BEGIN { $| = 1; print "1..1\n" }
+END {print "not ok 1\n" unless $loaded;}
+use FS::part_pop_local;
+$loaded=1;
+print "ok 1\n";
install the perl modules and httemplate as per install.html or upgrade8.html
+CREATE TABLE part_pop_local (
+ localnum int primary key,
+ popnum int not null,
+ city varchar(80) null,
+ state char(2) null,
+ npa char(3) not null,
+ nxx char(3) not null
+);
+CREATE UNIQUE INDEX part_pop_local1 ON part_pop_local ( npa, nxx );
+
Run bin/dbdef-create
#!/usr/bin/perl -Tw
#
-# $Id: fs-setup,v 1.58 2001-09-11 22:20:28 ivan Exp $
+# $Id: fs-setup,v 1.59 2001-09-26 09:17:06 ivan Exp $
#to delay loading dbdef until we're ready
BEGIN { $FS::Record::setup_hack = 1; }
],
'primary_key' => 'popnum',
'unique' => [ [] ],
- 'index' => [ [] ],
+ 'index' => [ [ 'state' ] ],
+ },
+
+ 'part_pop_local' => {
+ 'columns' => [
+ 'localnum', 'int', '', '',
+ 'popnum', 'int', '', '',
+ 'city', 'varchar', 'NULL', $char_d,
+ 'state', 'char', 'NULL', 2,
+ 'npa', 'char', '', 3,
+ 'nxx', 'char', '', 3,
+ ],
+ 'primary_key' => 'popnum',
+ 'unique' => [ [] ],
+ 'index' => [ [ 'npa', 'nxx' ] ],
},
'svc_acct' => {
<li>exch - exchange
<li>loc - rest of number
</ul>
+ <li><a name="part_pop_local" href="man/FS/part_pop_local.html">part_pop_local</a> - Local calling areas
+ <ul>
+ <li>localnum - primary key
+ <li>popnum - primary key
+ <li>city
+ <li>state
+ <li>npa - area code
+ <li>nxx - exchange
+ </ul>
<li><a name="svc_acct_sm" href="man/FS/svc_acct_sm.html">svc_acct_sm</a> - <b>DEPRECIATED</b> Domain mail aliases
<ul>
<li>svcnum - <a href="#cust_svc">primary key</a>
);
CREATE INDEX queue_arg1 ON queue_arg ( jobnum );
+CREATE TABLE part_pop_local (
+ localnum int primary key,
+ popnum int not null,
+ city varchar(80) null,
+ state char(2) null,
+ npa char(3) not null,
+ nxx char(3) not null
+);
+CREATE UNIQUE INDEX part_pop_local1 ON part_pop_local ( npa, nxx );
+
ALTER TABLE svc_acct ADD domsvc integer NOT NULL;
ALTER TABLE svc_domain ADD catchall integer NULL;
ALTER TABLE cust_main ADD referral_custnum integer NULL;