Difference between revisions of "Freeside:1.9:Documentation:Developer/FS/cust pay void"

From Freeside
Jump to: navigation, search
(import from POD)
 
(import from POD)
 
(One intermediate revision by the same user not shown)
Line 20: Line 20:
 
An FS::cust_pay_void object represents a voided payment. The following fields are currently supported:
 
An FS::cust_pay_void object represents a voided payment. The following fields are currently supported:
  
; paynum - primary key (assigned automatically for new payments); custnum - customer (see [[Freeside:1.9:Documentation:Developer/FS/cust main|FS::cust_main]]); paid - Amount of this payment; _date - specified as a UNIX timestamp; see [[Freeside:1.9:Documentation:Developer/perlfunc#time|"time" in perlfunc|perlfunc#time|"time" in perlfunc]]. Also see [[Freeside:1.9:Documentation:Developer/Time/Local|Time::Local]] and [[Freeside:1.9:Documentation:Developer/Date/Parse|Date::Parse]] for conversion functions.; payby - `CARD' (credit cards), `CHEK' (electronic check/ACH), `LECB' (phone bill billing), `BILL' (billing), `CASH' (cash), `WEST' (Western Union), `MCRD' (Manual credit card), or `COMP' (free); payinfo - card number, check #, or comp issuer (4-8 lowercase alphanumerics; think username), respectively; paybatch - text field for tracking card processing; closed - books closed flag, empty or `Y'; void_date; reason
+
; paynum - primary key (assigned automatically for new payments); custnum - customer (see [[Freeside:1.9:Documentation:Developer/FS/cust main|FS::cust_main]]); paid - Amount of this payment; _date - specified as a UNIX timestamp; see [[perlfunc#time|"time" in perlfunc]]. Also see [[Freeside:1.9:Documentation:Developer/Time/Local|Time::Local]] and [[Freeside:1.9:Documentation:Developer/Date/Parse|Date::Parse]] for conversion functions.; payby - `CARD' (credit cards), `CHEK' (electronic check/ACH), `LECB' (phone bill billing), `BILL' (billing), `CASH' (cash), `WEST' (Western Union), `MCRD' (Manual credit card), or `COMP' (free); payinfo - card number, check #, or comp issuer (4-8 lowercase alphanumerics; think username), respectively; paybatch - text field for tracking card processing; closed - books closed flag, empty or `Y'; void_date; reason
 
==METHODS==
 
==METHODS==
 
; new HASHREF
 
; new HASHREF
:Creates a new payment. To add the payment to the databse, see [[Freeside:1.9:Documentation:Developer/#insert|"insert"|#insert|"insert"]].
+
:Creates a new payment. To add the payment to the databse, see [[#insert|"insert"]].
 
; insert
 
; insert
 
:Adds this voided payment to the database.
 
:Adds this voided payment to the database.

Latest revision as of 18:10, 3 October 2007

NAME

FS::cust_pay_void - Object methods for cust_pay_void objects

SYNOPSIS

 use FS::cust_pay_void;

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

 $error = $record->insert;

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

 $error = $record->delete;

 $error = $record->check;

DESCRIPTION

An FS::cust_pay_void object represents a voided payment. The following fields are currently supported:

paynum - primary key (assigned automatically for new payments); custnum - customer (see FS::cust_main); paid - Amount of this payment; _date - specified as a UNIX timestamp; see "time" in perlfunc. Also see Time::Local and Date::Parse for conversion functions.; payby - `CARD' (credit cards), `CHEK' (electronic check/ACH), `LECB' (phone bill billing), `BILL' (billing), `CASH' (cash), `WEST' (Western Union), `MCRD' (Manual credit card), or `COMP' (free); payinfo - card number, check #, or comp issuer (4-8 lowercase alphanumerics; think username), respectively; paybatch - text field for tracking card processing; closed - books closed flag, empty or `Y'; void_date; reason

METHODS

new HASHREF
Creates a new payment. To add the payment to the databse, see "insert".
insert
Adds this voided payment to the database.
unvoid
"Un-void"s this payment: Deletes the voided payment from the database and adds back a normal payment.
delete
Deletes this voided payment. You probably don't want to use this directly; see the unvoid method to add the original payment back.
replace OLD_RECORD
Currently unimplemented.
check
Checks all fields to make sure this is a valid voided payment. If there is an error, returns the error, otherwise returns false. Called by the insert method.
cust_main
Returns the parent customer object (see FS::cust_main).

BUGS

Delete and replace methods.

SEE ALSO

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