Difference between revisions of "Freeside:1.9:Documentation:Developer/FS/cust credit refund"
From Freeside
(import from POD) |
(import from POD) |
||
(One intermediate revision by the same user not shown) | |||
Line 20: | Line 20: | ||
An FS::cust_credit_refund represents the application of a refund to a specific credit. FS::cust_credit_refund inherits from FS::Record. The following fields are currently supported: | An FS::cust_credit_refund represents the application of a refund to a specific credit. FS::cust_credit_refund inherits from FS::Record. The following fields are currently supported: | ||
− | ; creditrefundnum - primary key (assigned automatically); crednum - Credit (see [[Freeside:1.9:Documentation:Developer/FS/cust credit|FS::cust_credit]]); refundnum - Refund (see [[Freeside:1.9:Documentation:Developer/FS/cust refund|FS::cust_refund]]); amount - Amount of the refund to apply to the specific credit.; _date - specified as a UNIX timestamp; see [[ | + | ; creditrefundnum - primary key (assigned automatically); crednum - Credit (see [[Freeside:1.9:Documentation:Developer/FS/cust credit|FS::cust_credit]]); refundnum - Refund (see [[Freeside:1.9:Documentation:Developer/FS/cust refund|FS::cust_refund]]); amount - Amount of the refund to apply to the specific credit.; _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 | ||
− | :Creates a new record. To add the record to the database, see [[ | + | :Creates a new record. To add the record to the database, see [[#insert|"insert"]]. |
; insert | ; insert | ||
:Adds this record to the database. If there is an error, returns the error, otherwise returns false. | :Adds this record to the database. If there is an error, returns the error, otherwise returns false. |
Latest revision as of 18:09, 3 October 2007
Contents
NAME
FS::cust_credit_refund - Object methods for cust_bill_pay records
SYNOPSIS
use FS::cust_credit_refund; $record = new FS::cust_credit_refund \%hash; $record = new FS::cust_credit_refund { 'column' => 'value' }; $error = $record->insert; $error = $new_record->replace($old_record); $error = $record->delete; $error = $record->check;
DESCRIPTION
An FS::cust_credit_refund represents the application of a refund to a specific credit. FS::cust_credit_refund inherits from FS::Record. The following fields are currently supported:
- creditrefundnum - primary key (assigned automatically); crednum - Credit (see FS::cust_credit); refundnum - Refund (see FS::cust_refund); amount - Amount of the refund to apply to the specific credit.; _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 record. To add the record to the database, see "insert".
- insert
- Adds this record to the database. If there is an error, returns the error, otherwise returns false.
- delete
- Remove this cust_credit_refund from the database. If there is an error, returns the error, otherwise returns false.
- replace OLD_RECORD
- Currently unimplemented (accounting reasons).
- check
- Checks all fields to make sure this is a valid refund application. If there is an error, returns the error, otherwise returns false. Called by the insert method.
- cust_refund
- Returns the refund (see FS::cust_refund)
- cust_credit
- Returns the credit (see FS::cust_credit)
BUGS
Delete and replace methods.
the checks for over-applied refunds could be better done like the ones in cust_bill_credit
SEE ALSO
FS::cust_credit, FS::cust_refund, FS::Record, schema.html from the base documentation.