1 package FS::cust_bill_pkg_fee;
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 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 object records the origin of a fee.
29 FS::cust_bill_pkg_fee inherits from FS::Record. The following fields
30 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
39 (this 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'; }
56 # seeing as these methods are not defined in this module I object to having
57 # perldoc noise for them
61 Checks all fields to make sure this is a valid example. If there is
62 an error, returns the error, otherwise returns false. Called by the insert
71 $self->ut_numbern('billpkgfeenum')
72 || $self->ut_number('billpkgnum')
73 || $self->ut_foreign_key('base_invnum', 'cust_bill', 'invnum')
74 || $self->ut_foreign_keyn('base_billpkgnum', 'cust_bill_pkg', 'billpkgnum')
75 || $self->ut_money('amount')
77 return $error if $error;