% 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::cust_statement - Object methods for cust_statement records
use FS::cust_statement;
$record = new FS::cust_statement \%hash;
$record = new FS::cust_statement { 'column' => 'value' };
$error = $record->insert;
$error = $new_record->replace($old_record);
$error = $record->delete;
$error = $record->check;
An FS::cust_statement object represents an informational statement which aggregates one or more invoices. FS::cust_statement inherits from FS::cust_bill.
The following fields are currently supported:
primary key
customer
date
Creates a new record. To add the record to the database, see "insert".
Note that this stores the hash reference, not a distinct copy of the hash it points to. You can ask the object for a copy with the hash method.
Pass "statementnum => 'ALL'" to create a temporary statement that includes all of the customer's open invoices. This statement can't be inserted and won't set the statementnum field on any invoices.
Pass "invnum => number" to create a temporary statement including only the specified invoice. This is functionally the same as the invoice itself, but will be rendered using the statement template and other statement-specific options.
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 the associated invoices (cust_bill records) for this statement.
Returns the line items (see FS::cust_bill_pkg) for all associated invoices.
Returns the line items (see FS::cust_bill_pkg) for all associated invoices and specified pkgnum.
Returns all payment applications (see FS::cust_bill_pay) for all associated invoices.
Returns all applied credits (see FS::cust_credit_bill) for all associated invoices.
Returns all payment applications (see FS::cust_bill_pay) for all associated invoices with matching pkgnum.
Returns all applied credits (see FS::cust_credit_bill) for all associated invoices with matching pkgnum.
Returns the total tax amount for all assoicated invoices.0
Returns the total amount charged for all associated invoices.
Returns the total amount owed for all associated invoices.
FS::cust_bill, FS::Record, schema.html from the base documentation.