Freeside:4:Documentation:Developer/FS/cust credit void
From Freeside
< Freeside:4:Documentation:Developer | FS
Revision as of 07:20, 18 November 2015 by Jeremyd (talk | contribs) (Edit via perl MediaWiki framework (1.13))
Contents
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.