1 package FS::cust_tax_exempt_pkg_void;
4 use base qw( FS::Record );
5 use FS::Record; # qw( qsearch qsearchs );
6 use FS::cust_bill_pkg_void;
7 use FS::cust_main_county;
11 FS::cust_tax_exempt_pkg_void - Object methods for cust_tax_exempt_pkg_void records
15 use FS::cust_tax_exempt_pkg_void;
17 $record = new FS::cust_tax_exempt_pkg_void \%hash;
18 $record = new FS::cust_tax_exempt_pkg_void { '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_tax_exempt_pkg_void object represents a voided record of a customer
31 tax exemption. FS::cust_tax_exempt_pkg_void inherits from FS::Record. The
32 following fields are currently supported:
56 =item creditbillpkgnum
73 Creates a new record. To add the record to the database, see L<"insert">.
75 Note that this stores the hash reference, not a distinct copy of the hash it
76 points to. You can ask the object for a copy with the I<hash> method.
80 sub table { 'cust_tax_exempt_pkg_void'; }
84 Adds this record to the database. If there is an error, returns the error,
85 otherwise returns false.
91 Delete this record from the database.
95 =item replace OLD_RECORD
97 Replaces the OLD_RECORD with this one in the database. If there is an error,
98 returns the error, otherwise returns false.
104 Checks all fields to make sure this is a valid record. If there is
105 an error, returns the error, otherwise returns false. Called by the insert
114 $self->ut_number('exemptpkgnum')
115 || $self->ut_foreign_key('billpkgnum', 'cust_bill_pkg_void', 'billpkgnum' )
116 || $self->ut_foreign_key('taxnum', 'cust_main_county', 'taxnum')
117 || $self->ut_numbern('year')
118 || $self->ut_numbern('month')
119 || $self->ut_numbern('creditbillpkgnum') #no FK check, will have been del'ed
120 || $self->ut_money('amount')
121 || $self->ut_flag('exempt_cust')
122 || $self->ut_flag('exempt_setup')
123 || $self->ut_flag('exempt_recur')
124 || $self->ut_flag('exempt_cust_taxname')
125 || $self->ut_flag('exempt_monthly')
127 return $error if $error;
138 L<FS::Record>, schema.html from the base documentation.