1 package FS::cust_bill_pkg_fee_void;
4 use base qw( FS::Record );
5 use FS::Record qw( qsearch qsearchs );
9 FS::cust_bill_pkg_fee - Object methods for cust_bill_pkg_fee_void records
13 use FS::cust_bill_pkg_fee;
15 $record = new FS::cust_bill_pkg_fee \%hash;
16 $record = new FS::cust_bill_pkg_fee { 'column' => 'value' };
18 $error = $record->insert;
20 $error = $new_record->replace($old_record);
22 $error = $record->delete;
24 $error = $record->check;
28 An FS::cust_bill_pkg_fee_void object records the origin of a fee that
29 appears on a voided invoice. FS::cust_bill_pkg_fee_void inherits from
30 FS::Record. The following fields are currently supported:
34 =item billpkgfeenum - primary key
36 =item billpkgnum - the billpkgnum of the fee line item
38 =item base_invnum - the invoice number (L<FS::cust_bill>) that caused (this
39 portion of) the fee to be charged.
41 =item base_billpkgnum - the invoice line item (L<FS::cust_bill_pkg>) that
42 caused (this portion of) the fee to be charged. May be null.
44 =item amount - the fee amount
54 sub table { 'cust_bill_pkg_fee_void'; }
58 Checks all fields to make sure this is a valid record. If there is an error,
59 returns the error, otherwise returns false. Called by the insert and replace
64 sub check { my $self = shift;
66 my $error = $self->ut_numbern('billpkgfeenum')
67 || $self->ut_number('billpkgnum')
68 || $self->ut_foreign_key('base_invnum', 'cust_bill', 'invnum')
69 || $self->ut_foreign_keyn('base_billpkgnum', 'cust_bill_pkg', 'billpkgnum')
70 || $self->ut_money('amount')
72 return $error if $error;
74 $self->SUPER::check; }