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

From Freeside
Jump to: navigation, search
(Edit via perl MediaWiki framework (1.13))
 
m (Edit via perl MediaWiki framework (1.13))
 
Line 28: Line 28:
 
; check
 
; check
 
:Checks all fields to make sure this is a valid voided credit. If there is an error, returns the error, otherwise returns false. Called by the insert method.
 
:Checks all fields to make sure this is a valid voided credit. If there is an error, returns the error, otherwise returns false. Called by the insert method.
 +
; unvoid
 +
:"Un-void"s this credit: Deletes the voided credit from the database and adds back (but does not re-apply) a normal credit.
 
; cust_main
 
; cust_main
 
:Returns the parent customer object (see [[Freeside:3:Documentation:Developer/FS/cust main|FS::cust_main]]).
 
:Returns the parent customer object (see [[Freeside:3:Documentation:Developer/FS/cust main|FS::cust_main]]).
 
; void_access_user
 
; void_access_user
 
:Returns the voiding employee object (see [[Freeside:3:Documentation:Developer/FS/access user|FS::access_user]]).
 
:Returns the voiding employee object (see [[Freeside:3:Documentation:Developer/FS/access user|FS::access_user]]).
 +
; void_access_user_name
 +
:Returns the voiding employee name.
 +
; void_reason
 +
:Returns the text of the associated void credit reason (see [[Freeside:3:Documentation:Developer/FS/reason|FS::reason]]) for this voided credit.
 +
 +
:The reason for the original credit remains accessible through the reason method.
  
 
==BUGS==
 
==BUGS==

Latest revision as of 08:16, 2 March 2015

NAME

FS::cust_credit_void - Object methods for cust_credit_void objects

SYNOPSIS

 use FS::cust_credit_void;

 $record = new FS::cust_credit_void \%hash;
 $record = new FS::cust_credit_void { 'column' => 'value' };

 $error = $record->insert;

 $error = $new_record->replace($old_record);

 $error = $record->delete;

 $error = $record->check;

DESCRIPTION

An FS::cust_credit_void object represents a voided credit. All fields in FS::cust_credit are present, as well as:

void_date - the date (unix timestamp) that the credit was voided; void_reason - the reason (a freeform string); void_usernum - the user (FS::access_user) who voided it

METHODS

new HASHREF
Creates a new voided credit record.
insert
Adds this voided credit to the database.
check
Checks all fields to make sure this is a valid voided credit. If there is an error, returns the error, otherwise returns false. Called by the insert method.
unvoid
"Un-void"s this credit: Deletes the voided credit from the database and adds back (but does not re-apply) a normal credit.
cust_main
Returns the parent customer object (see FS::cust_main).
void_access_user
Returns the voiding employee object (see FS::access_user).
void_access_user_name
Returns the voiding employee name.
void_reason
Returns the text of the associated void credit reason (see FS::reason) for this voided credit.
The reason for the original credit remains accessible through the reason method.

BUGS

Doesn't yet support unvoid.

SEE ALSO

FS::cust_credit, FS::Record, schema.html from the base documentation.