1 package FS::cust_main_county;
7 @ISA = qw( FS::Record );
11 FS::cust_main_county - Object methods for cust_main_county objects
15 use FS::cust_main_county;
17 $record = new FS::cust_main_county \%hash;
18 $record = new FS::cust_main_county { 'column' => 'value' };
20 $error = $record->insert;
22 $error = $new_record->replace($old_record);
24 $error = $record->delete;
26 $error = $record->check;
30 An FS::cust_main_county object represents a tax rate, defined by locale.
31 FS::cust_main_county inherits from FS::Record. The following fields are
36 =item taxnum - primary key (assigned automatically for new tax rates)
44 =item tax - percentage
54 Creates a new tax rate. To add the tax rate to the database, see L<"insert">.
58 sub table { 'cust_main_county'; }
62 Adds this tax rate to the database. If there is an error, returns the error,
63 otherwise returns false.
67 Deletes this tax rate from the database. If there is an error, returns the
68 error, otherwise returns false.
70 =item replace OLD_RECORD
72 Replaces the OLD_RECORD with this one in the database. If there is an error,
73 returns the error, otherwise returns false.
77 Checks all fields to make sure this is a valid tax rate. If there is an error,
78 returns the error, otherwise returns false. Called by the insert and replace
86 $self->ut_numbern('taxnum')
87 || $self->ut_textn('state')
88 || $self->ut_textn('county')
89 || $self->ut_float('tax')
98 $Id: cust_main_county.pm,v 1.3 1998-12-29 11:59:41 ivan Exp $
104 L<FS::Record>, L<FS::cust_main>, L<FS::cust_bill>, schema.html from the base
109 ivan@voicenet.com 97-dec-16
111 Changed check for 'tax' to use the new ut_float subroutine
112 bmccane@maxbaud.net 98-apr-3
114 pod ivan@sisd.com 98-sep-21
116 $Log: cust_main_county.pm,v $
117 Revision 1.3 1998-12-29 11:59:41 ivan
118 mostly properly OO, some work still to be done with svc_ stuff
120 Revision 1.2 1998/11/18 09:01:43 ivan