Freeside:4:Documentation:Developer/FS/cust pay 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_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.
- otaker
- order taker (see FS::access_user)
- payby
- Payment Type (See FS::payinfo_Mixin for valid values)
- 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'
- pkgnum
- Desired pkgnum when using experimental package balances.
- void_date; reason - a freeform string (deprecated); reasonnum - Reason for voiding the payment (see FS::reson)
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 ]
- You can, but probably shouldn't modify voided payments...
- Replaces the OLD_RECORD with this one in the database, or, if OLD_RECORD is not supplied, replaces this record. If there is an error, returns the error, otherwise returns false.
- 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).
- void_access_user
- Returns the voiding employee object (see FS::access_user).
- reason
- Returns the text of the associated void reason (see FS::reason) for this.
BUGS
Delete and replace methods.
SEE ALSO
FS::cust_pay, FS::Record, schema.html from the base documentation.