Difference between revisions of "Freeside:3:Documentation:Developer/FS/cust bill void"
From Freeside
(Edit via perl MediaWiki framework (1.13)) |
(No difference)
|
Revision as of 14:32, 27 June 2014
NAME
FS::cust_bill_void - Object methods for cust_bill_void records
SYNOPSIS
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;
DESCRIPTION
An FS::cust_bill_void object represents a voided invoice. FS::cust_bill_void inherits from FS::Record. The following fields are currently supported:
- invnum
- primary key
- custnum
- custnum
- _date
- _date
- charged
- charged
- invoice_terms
- invoice_terms
- previous_balance
- previous_balance
- billing_balance
- billing_balance
- closed
- closed
- statementnum
- statementnum
- agent_invid
- agent_invid
- promised_date
- promised_date
- void_date
- void_date
- reason
- reason
- void_usernum
- void_usernum
METHODS
- new HASHREF
- 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.
- insert
- Adds this record to the database. If there is an error, returns the error, otherwise returns false.
- unvoid
- "Un-void"s this invoice: Deletes the voided invoice from the database and adds back a normal invoice (and related tables).
- 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 voided invoice. If there is an error, returns the error, otherwise returns false. Called by the insert and replace methods.
- display_invnum
- 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.
- void_access_user
- Returns the voiding employee object (see FS::access_user).
- cust_main; cust_bill_pkg
- cust_pkg
- Returns the packages (see FS::cust_pkg) corresponding to the line items for this invoice.
- search_sql_where HASHREF
- Class method which returns an SQL WHERE fragment to search for parameters specified in HASHREF. Accepts the following parameters for FS::cust_bill::search_sql_where: _date, invnum_min, invnum_max, agentnum, custnum, cust_classnum, refnum, payby. Also accepts the following:
- void_date
- Arrayref of start and end date to find invoices voided in a date range.
- void_usernum
- User identifier (FS::access_user key) that voided the invoice.
- enable_previous
BUGS
SEE ALSO
FS::Record, schema.html from the base documentation.
POD ERRORS
Hey! The above document had some coding errors, which are explained below:
- Around line 269:
- '=item' outside of any '=over'