1 package FS::cust_bill_pkg_tax_rate_location_void;
4 use base qw( FS::Record );
5 use FS::Record; # qw( qsearch qsearchs );
6 use FS::cust_bill_pkg_void;
7 use FS::tax_rate_location;
11 FS::cust_bill_pkg_tax_rate_location_void - Object methods for cust_bill_pkg_tax_rate_location_void records
15 use FS::cust_bill_pkg_tax_rate_location_void;
17 $record = new FS::cust_bill_pkg_tax_rate_location_void \%hash;
18 $record = new FS::cust_bill_pkg_tax_rate_location_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_bill_pkg_tax_rate_location_void object represents a voided record
31 of taxation based on package location.
32 FS::cust_bill_pkg_tax_rate_location_void inherits from FS::Record. The
33 following fields are currently supported:
37 =item billpkgtaxratelocationnum
57 =item taxratelocationnum
74 Creates a new record. To add the record to the database, see L<"insert">.
76 Note that this stores the hash reference, not a distinct copy of the hash it
77 points to. You can ask the object for a copy with the I<hash> method.
81 sub table { 'cust_bill_pkg_tax_rate_location_void'; }
85 Adds this record to the database. If there is an error, returns the error,
86 otherwise returns false.
92 Delete this record from the database.
96 =item replace OLD_RECORD
98 Replaces the OLD_RECORD with this one in the database. If there is an error,
99 returns the error, otherwise returns false.
105 Checks all fields to make sure this is a valid record. If there is
106 an error, returns the error, otherwise returns false. Called by the insert
115 $self->ut_number('billpkgtaxratelocationnum')
116 || $self->ut_foreign_key('billpkgnum', 'cust_bill_pkg_void', 'billpkgnum' )
117 || $self->ut_number('taxnum') #cust_bill_pkg/tax_rate key, based on taxtype
118 || $self->ut_text('taxtype', [ qw( FS::cust_main_county FS::tax_rate ) ] )
119 || $self->ut_textn('locationtaxid')
120 || $self->ut_foreign_key('taxratelocationnum', 'tax_rate_location', 'taxratelocationnum' )
121 || $self->ut_money('amount')
123 return $error if $error;
134 L<FS::cust_bill_pkg_tax_rate_location>, L<FS::Record>, schema.html from the base documentation.