1 package FS::cust_bill_pkg_void;
2 use base qw( FS::TemplateItem_Mixin FS::Record );
5 use FS::Record qw( qsearch qsearchs );
6 use FS::cust_bill_void;
7 use FS::cust_bill_pkg_detail_void;
8 use FS::cust_bill_pkg_display_void;
9 use FS::cust_bill_pkg_discount_void;
13 FS::cust_bill_pkg_void - Object methods for cust_bill_pkg_void records
17 use FS::cust_bill_pkg_void;
19 $record = new FS::cust_bill_pkg_void \%hash;
20 $record = new FS::cust_bill_pkg_void { 'column' => 'value' };
22 $error = $record->insert;
24 $error = $new_record->replace($old_record);
26 $error = $record->delete;
28 $error = $record->check;
32 An FS::cust_bill_pkg_void object represents a voided invoice line item.
33 FS::cust_bill_pkg_void inherits from FS::Record. The following fields are
50 =item pkgpart_override
111 Creates a new record. To add the record to the database, see L<"insert">.
113 Note that this stores the hash reference, not a distinct copy of the hash it
114 points to. You can ask the object for a copy with the I<hash> method.
118 sub table { 'cust_bill_pkg_void'; }
120 sub detail_table { 'cust_bill_pkg_detail_void'; }
121 sub display_table { 'cust_bill_pkg_display_void'; }
122 sub discount_table { 'cust_bill_pkg_discount_void'; }
123 #sub tax_location_table { 'cust_bill_pkg_tax_location'; }
124 #sub tax_rate_location_table { 'cust_bill_pkg_tax_rate_location'; }
125 #sub tax_exempt_pkg_table { 'cust_tax_exempt_pkg'; }
129 Adds this record to the database. If there is an error, returns the error,
130 otherwise returns false.
136 Delete this record from the database.
140 =item replace OLD_RECORD
142 Replaces the OLD_RECORD with this one in the database. If there is an error,
143 returns the error, otherwise returns false.
149 Checks all fields to make sure this is a valid record. If there is
150 an error, returns the error, otherwise returns false. Called by the insert
159 $self->ut_number('billpkgnum')
160 || $self->ut_snumber('pkgnum')
161 || $self->ut_number('invnum') #cust_bill or cust_bill_void, if we ever support line item voiding
162 || $self->ut_numbern('pkgpart_override')
163 || $self->ut_money('setup')
164 || $self->ut_money('recur')
165 || $self->ut_numbern('sdate')
166 || $self->ut_numbern('edate')
167 || $self->ut_textn('itemdesc')
168 || $self->ut_textn('itemcomment')
169 || $self->ut_textn('section')
170 || $self->ut_textn('freq')
171 || $self->ut_numbern('quantity')
172 || $self->ut_moneyn('unitsetup')
173 || $self->ut_moneyn('unitrecur')
174 || $self->ut_enum('hidden', [ '', 'Y' ])
176 return $error if $error;
183 Returns the voided invoice (see L<FS::cust_bill_void>) for this voided line
190 #cust_bill or cust_bill_void, if we ever support line item voiding
191 qsearchs( 'cust_bill_void', { 'invnum' => $self->invnum } );
200 L<FS::Record>, schema.html from the base documentation.