Difference between revisions of "Freeside:3:Documentation:Developer/FS/cust bill void"

From Freeside
Jump to: navigation, search
(Edit via perl MediaWiki framework (1.13))
 
m (Edit via perl MediaWiki framework (1.13))
Line 72: Line 72:
 
:Returns the packages (see [[Freeside:3:Documentation:Developer/FS/cust pkg|FS::cust_pkg]]) corresponding to the line items for this invoice.
 
:Returns the packages (see [[Freeside:3:Documentation:Developer/FS/cust pkg|FS::cust_pkg]]) corresponding to the line items for this invoice.
 
; search_sql_where HASHREF
 
; search_sql_where HASHREF
:Class method which returns an SQL WHERE fragment to search for parameters specified in HASHREF. Accepts the following parameters for [[Freeside:3:Documentation:Developer/FS/cust bill/search sql where|FS::cust_bill::search_sql_where]]: <tt>_date</tt>, <tt>invnum_min</tt>, <tt>invnum_max</tt>, <tt>agentnum</tt>, <tt>custnum</tt>, <tt>cust_classnum</tt>, <tt>refnum</tt>, <tt>payby</tt>. Also accepts the following:
+
:Class method which returns an SQL WHERE fragment to search for parameters specified in HASHREF. Accepts the following parameters for [[Freeside:3:Documentation:Developer/FS/cust bill/search sql where|FS::cust_bill::search_sql_where]]: <tt>_date</tt>, <tt>invnum_min</tt>, <tt>invnum_max</tt>, <tt>agentnum</tt>, <tt>custnum</tt>, <tt>cust_classnum</tt>, <tt>refnum</tt>. Also accepts the following:
 
:; void_date
 
:; void_date
 
::Arrayref of start and end date to find invoices voided in a date range.
 
::Arrayref of start and end date to find invoices voided in a date range.
Line 85: Line 85:
 
Hey! '''The above document had some coding errors, which are explained below:'''
 
Hey! '''The above document had some coding errors, which are explained below:'''
  
; Around line 269&#58;
+
; Around line 261&#58;
 
:'=item' outside of any '=over'
 
:'=item' outside of any '=over'

Revision as of 06:30, 24 March 2015

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. 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 261:
'=item' outside of any '=over'