% 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_bill_void - Object methods for cust_bill_void records
use FS::cust_bill_void;
$record = new FS::cust_bill_void \%hash;
$record = new FS::cust_bill_void { 'column' => 'value' };
$error = $record->insert;
$error = $new_record->replace($old_record);
$error = $record->delete;
$error = $record->check;
An FS::cust_bill_void object represents a voided invoice. FS::cust_bill_void inherits from FS::Record. The following fields are currently supported:
primary key
custnum
_date
charged
invoice_terms
previous_balance
billing_balance
closed
statementnum
agent_invid
promised_date
void_date
freeform string (deprecated)
reason for voiding the payment (see FS::reason)
void_usernum
Creates a new voided invoice. To add the voided invoice 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.
Adds this record to the database. If there is an error, returns the error, otherwise returns false.
"Un-void"s this invoice: Deletes the voided invoice from the database and adds back a normal invoice (and related tables).
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 voided invoice. If there is an error, returns the error, otherwise returns false. Called by the insert and replace methods.
Returns the displayed invoice number for this invoice: agent_invid if cust_bill-default_agent_invid is set and it has a value, invnum otherwise.
Returns the voiding employee object (see FS::access_user).
Returns the text of the associated void reason (see FS::reason) for this.
Returns the packages (see FS::cust_pkg) corresponding to the line items for this invoice.
Class method which returns an SQL WHERE fragment to search for parameters specified in HASHREF. Accepts the following parameters for "search_sql_where" in FS::cust_bill: _date, invnum_min, invnum_max, agentnum, custnum, cust_classnum, refnum. Also accepts the following:
Arrayref of start and end date to find invoices voided in a date range.
User identifier (FS::access_user key) that voided the invoice.
FS::Record, schema.html from the base documentation.
Hey! The above document had some coding errors, which are explained below:
'=item' outside of any '=over'