% 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::commission_schedule - Object methods for commission_schedule records
use FS::commission_schedule;
$record = new FS::commission_schedule \%hash;
$record = new FS::commission_schedule { 'column' => 'value' };
$error = $record->insert;
$error = $new_record->replace($old_record);
$error = $record->delete;
$error = $record->check;
An FS::commission_schedule object represents a bundle of one or more commission rates for invoices. FS::commission_schedule inherits from FS::Record. The following fields are currently supported:
Creates a new commission schedule. To add the object to the database, see "insert".
Adds this record to the database. If there is an error, returns the error, otherwise returns false.
Delete this record from the database.
Replaces the OLD_RECORD with this one in the database. If there is an error, returns the error, otherwise returns false.
Checks all fields to make sure this is a valid record. If there is an error, returns the error, otherwise returns false. Called by the insert and replace methods.
Returns a list of billing events (FS::part_event objects) that pay commission on this schedule.
Takes an FS::cust_bill object and calculates credit on this schedule. Returns the amount to credit. If there's no rate defined for this invoice, returns nothing.