Freeside:1.9:Documentation:Developer/FS/cust pay void
From Freeside
Contents
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.