1 package FS::part_pkg_taxoverride;
11 FS::part_pkg_taxoverride - Object methods for part_pkg_taxoverride records
15 use FS::part_pkg_taxoverride;
17 $record = new FS::part_pkg_taxoverride \%hash;
18 $record = new FS::part_pkg_taxoverride { 'column' => 'value' };
20 $error = $record->insert;
22 $error = $new_record->replace($old_record);
24 $error = $record->delete;
26 $error = $record->check;
30 An FS::part_pkg_taxoverride object represents a manual mapping of a
31 package to tax rates. FS::part_pkg_taxoverride inherits from FS::Record.
32 The following fields are currently supported:
42 The package definition id
56 Creates a new tax override. To add the tax product to the database, see L<"insert">.
58 Note that this stores the hash reference, not a distinct copy of the hash it
59 points to. You can ask the object for a copy with the I<hash> method.
63 sub table { 'part_pkg_taxoverride'; }
67 Adds this record to the database. If there is an error, returns the error,
68 otherwise returns false.
74 Delete this record from the database.
78 =item replace OLD_RECORD
80 Replaces the OLD_RECORD with this one in the database. If there is an error,
81 returns the error, otherwise returns false.
87 Checks all fields to make sure this is a valid tax product. If there is
88 an error, returns the error, otherwise returns false. Called by the insert
97 $self->ut_numbern('taxoverridenum')
98 || $self->ut_foreign_key('pkgpart', 'part_pkg', 'pkgpart')
99 || $self->ut_foreign_key('taxclassnum', 'tax_class', 'taxclassnum')
101 return $error if $error;
114 L<FS::Record>, schema.html from the base documentation.