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

From Freeside
Jump to: navigation, search
(import from POD)
(import from POD)
 
Line 20: Line 20:
 
An FS::cust_pay_refund object represents application of a refund (see [[Freeside:1.9:Documentation:Developer/FS/cust refund|FS::cust_refund]]) to an payment (see [[Freeside:1.9:Documentation:Developer/FS/cust pay|FS::cust_pay]]). FS::cust_pay_refund inherits from FS::Record. The following fields are currently supported:
 
An FS::cust_pay_refund object represents application of a refund (see [[Freeside:1.9:Documentation:Developer/FS/cust refund|FS::cust_refund]]) to an payment (see [[Freeside:1.9:Documentation:Developer/FS/cust pay|FS::cust_pay]]). FS::cust_pay_refund inherits from FS::Record. The following fields are currently supported:
  
; payrefundnum - primary key; paynum - credit being applied; refundnum - invoice to which credit is applied (see [[Freeside:1.9:Documentation:Developer/FS/cust bill|FS::cust_bill]]); amount - amount of the credit applied; _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.
+
; payrefundnum - primary key; paynum - credit being applied; refundnum - invoice to which credit is applied (see [[Freeside:1.9:Documentation:Developer/FS/cust bill|FS::cust_bill]]); amount - amount of the credit applied; _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.
 
==METHODS==
 
==METHODS==
 
; new HASHREF
 
; new HASHREF

Latest revision as of 18:10, 3 October 2007

NAME

FS::cust_pay_refund - Object methods for cust_pay_refund records

SYNOPSIS

 use FS::cust_pay_refund;

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

 $error = $record->insert;

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

 $error = $record->delete;

 $error = $record->check;

DESCRIPTION

An FS::cust_pay_refund object represents application of a refund (see FS::cust_refund) to an payment (see FS::cust_pay). FS::cust_pay_refund inherits from FS::Record. The following fields are currently supported:

payrefundnum - primary key; paynum - credit being applied; refundnum - invoice to which credit is applied (see FS::cust_bill); amount - amount of the credit applied; _date - specified as a UNIX timestamp; see "time" in perlfunc. Also see Time::Local and Date::Parse for conversion functions.

METHODS

new HASHREF
Creates a new cust_pay_refund. To add the cust_pay_refund to the database, see "insert".
insert
Adds this cust_pay_refund to the database. If there is an error, returns the error, otherwise returns false.
delete; replace OLD_RECORD
Application of refunds to payments may not be modified.
check
Checks all fields to make sure this is a valid refund application to a payment. If there is an error, returns the error, otherwise returns false. Called by the insert and replace methods.
sub cust_pay
Returns the payment (see FS::cust_pay)
cust_refund
Returns the refund (see FS::cust_refund)

BUGS

The delete method.

SEE ALSO

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