Freeside:3:Documentation:Developer/FS/cust event fee

From Freeside
< Freeside:3:Documentation:Developer‎ | FS
Revision as of 09:58, 10 April 2015 by Jeremyd (talk | contribs) (Edit via perl MediaWiki framework (1.13))

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

NAME

FS::cust_event_fee - Object methods for cust_event_fee records

SYNOPSIS

 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;

DESCRIPTION

An FS::cust_event_fee object links a billing event that charged a fee (an FS::cust_event) to the resulting invoice line item (an FS::cust_bill_pkg object). FS::cust_event_fee inherits from FS::Record and FS::FeeOrigin_Mixin. The following fields are currently supported:

eventfeenum - primary key; eventnum - key of the cust_event record that required the fee to be created. This is a unique column; there's no reason for a single event instance to create more than one fee.; billpkgnum - key of the cust_bill_pkg record representing the fee on an invoice. This is also a unique column but can be NULL to indicate a fee that hasn't been billed yet. In that case it will be billed the next time billing runs for the customer.; feepart - key of the fee definition (FS::part_fee).; nextbill - 'Y' if the fee should be charged on the customer's next bill, rather than causing a bill to be produced immediately.

METHODS

new HASHREF
Creates a new event-fee link. To add the record to the database, see "insert".
insert
Adds this record to the database. If there is an error, returns the error, otherwise returns false.
delete
Delete this record from the database.
replace OLD_RECORD
Replaces the OLD_RECORD with this one in the database. If there is an error, returns the error, otherwise returns false.
check
Checks all fields to make sure this is a valid example. If there is an error, returns the error, otherwise returns false. Called by the insert and replace methods.

CLASS METHODS

_by_cust CUSTNUM[, PARAMS]
See "by cust" in FS/FeeOrigin Mixin|FS::FeeOrigin_Mixin#by_cust|"by_cust" in FS::FeeOrigin_Mixin. This is the implementation for event-triggered fees.
cust_bill
See "cust bill" in FS/FeeOrigin Mixin|FS::FeeOrigin_Mixin#cust_bill|"cust_bill" in FS::FeeOrigin_Mixin. This version simply returns the event object if the event is an invoice event.
cust_pkg
See "cust bill" in FS/FeeOrigin Mixin|FS::FeeOrigin_Mixin#cust_bill|"cust_bill" in FS::FeeOrigin_Mixin. This version simply returns the event object if the event is a package event.

BUGS

SEE ALSO

FS::cust_event, FS::FeeOrigin_Mixin, FS::Record

POD ERRORS

Hey! The above document had some coding errors, which are explained below:

Around line 205:
You forgot a '=back' before '=head1'