<% include( '/elements/header.html', 'Developer Documentation' ) %> <& /elements/menubar.html, 'Freeside Perl Modules' => $fsurl.'docs/library/FS.html', 'Complete Index' => $fsurl.'docs/library/index.html', &>

FS::cust_pay_refund

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.

<% include ('/elements/footer.html' ) %>