% include( '/elements/header.html', 'Developer Documentation' ) %> <& /elements/menubar.html, 'Freeside Perl Modules' => $fsurl.'docs/library/FS.html', 'Complete Index' => $fsurl.'docs/library/index.html', &>
FS::FeeOrigin_Mixin - Common interface for fee origin records
use FS::cust_event_fee;
$record = new FS::cust_event_fee \%hash;
$record = new FS::cust_event_fee { 'column' => 'value' };
$error = $record->insert;
$error = $new_record->replace($old_record);
$error = $record->delete;
$error = $record->check;
An FS::FeeOrigin_Mixin object associates the timestamped event that triggered a fee (which may be a billing event, or something else like a package suspension) to the resulting invoice line item (FS::cust_bill_pkg object). The following fields are required:
Finds all cust_event_fee records belonging to the customer CUSTNUM.
PARAMS can be additional params to pass to qsearch; this really only works for 'hashref' and 'order_by'.
The "by_cust" search method. Each subclass must implement this.
If the fee origin generates a fee based on past invoices (for example, an invoice event that charges late fees), this method should return the FS::cust_bill object that will be the basis for the fee. If this returns nothing, then then fee will be based on the rest of the invoice where it appears.
If the fee origin generates a fee limited in scope to one package (for example, a package reconnection fee event), this method should return the FS::cust_pkg object the fee applies to. If it's a percentage fee, this determines which charges it's a percentage of; otherwise it just affects the fee description appearing on the invoice.
Currently not tested in combination with "cust_bill"; be careful.
FS::cust_event_fee, FS::cust_pkg_reason_fee, FS::cust_bill_pkg, FS::part_fee
Hey! The above document had some coding errors, which are explained below:
You forgot a '=back' before '=head1'