1 package FS::cust_tax_adjustment;
4 use base qw( FS::Record );
5 use FS::Record qw( qsearch qsearchs );
11 FS::cust_tax_adjustment - Object methods for cust_tax_adjustment records
15 use FS::cust_tax_adjustment;
17 $record = new FS::cust_tax_adjustment \%hash;
18 $record = new FS::cust_tax_adjustment { '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_adjustment object represents an taxation adjustment.
31 FS::cust_tax_adjustment inherits from FS::Record. The following fields are
69 Creates a new record. To add the record to the database, see L<"insert">.
71 Note that this stores the hash reference, not a distinct copy of the hash it
72 points to. You can ask the object for a copy with the I<hash> method.
76 # the new method can be inherited from FS::Record, if a table method is defined
78 sub table { 'cust_tax_adjustment'; }
82 Adds this record to the database. If there is an error, returns the error,
83 otherwise returns false.
87 # the insert method can be inherited from FS::Record
91 Delete this record from the database.
95 # the delete method can be inherited from FS::Record
97 =item replace OLD_RECORD
99 Replaces the OLD_RECORD with this one in the database. If there is an error,
100 returns the error, otherwise returns false.
104 # the replace method can be inherited from FS::Record
108 Checks all fields to make sure this is a valid record. If there is
109 an error, returns the error, otherwise returns false. Called by the insert
114 # the check method should currently be supplied - FS::Record contains some
115 # data checking routines
121 $self->ut_numbern('adjustmentnum')
122 || $self->ut_foreign_key('custnum', 'cust_main', 'custnum' )
123 || $self->ut_text('taxname')
124 || $self->ut_money('amount')
125 || $self->ut_textn('comment')
126 || $self->ut_foreign_keyn('billpkgnum', 'cust_bill_pkg', 'billpkgnum' )
128 return $error if $error;
135 qsearchs('cust_bill_pkg', { 'billpkgnum' => $self->billpkgnum } );
144 L<FS::Record>, schema.html from the base documentation.