Difference between revisions of "Freeside:3:Documentation:Developer/FS/cust bill pay"
From Freeside
m (Edit via perl MediaWiki framework (1.13)) |
m (Edit via perl MediaWiki framework (1.13)) |
||
Line 1: | Line 1: | ||
+ | ==NAME== | ||
+ | FS::cust_bill_pay - Object methods for cust_bill_pay records | ||
+ | ==SYNOPSIS== | ||
+ | <code> | ||
+ | use FS::cust_bill_pay; | ||
+ | |||
+ | $record = new FS::cust_bill_pay \%hash; | ||
+ | $record = new FS::cust_bill_pay { 'column' => 'value' }; | ||
+ | |||
+ | $error = $record->insert; | ||
+ | |||
+ | $error = $new_record->replace($old_record); | ||
+ | |||
+ | $error = $record->delete; | ||
+ | |||
+ | $error = $record->check; | ||
+ | </code> | ||
+ | ==DESCRIPTION== | ||
+ | An FS::cust_bill_pay object represents the application of a payment to a specific invoice. FS::cust_bill_pay inherits from FS::cust_bill_ApplicationCommon and FS::Record. The following fields are currently supported: | ||
+ | |||
+ | ; billpaynum - primary key (assigned automatically); invnum - Invoice (see [[Freeside:3:Documentation:Developer/FS/cust bill|FS::cust_bill]]); paynum - Payment (see [[Freeside:3:Documentation:Developer/FS/cust pay|FS::cust_pay]]); amount - Amount of the payment to apply to the specific invoice.; _date - specified as a UNIX timestamp; see [[perlfunc#time|"time" in perlfunc]]. Also see [[Freeside:3:Documentation:Developer/Time/Local|Time::Local]] and [[Freeside:3:Documentation:Developer/Date/Parse|Date::Parse]] for conversion functions. | ||
+ | ==METHODS== | ||
+ | ; new HASHREF | ||
+ | :Creates a new record. To add the record to the database, see [[#insert|"insert"]]. | ||
+ | ; insert | ||
+ | :Adds this record to the database. If there is an error, returns the error, otherwise returns false. | ||
+ | ; delete | ||
+ | :Deletes this payment application, unless the closed flag for the parent payment (see [[Freeside:3:Documentation:Developer/FS/cust pay|FS::cust_pay]]) is set. | ||
+ | ; replace OLD_RECORD | ||
+ | :Currently unimplemented (accounting reasons). | ||
+ | ; check | ||
+ | :Checks all fields to make sure this is a valid payment application. If there is an error, returns the error, otherwise returns false. Called by the insert method. | ||
+ | ; cust_pay | ||
+ | :Returns the payment (see [[Freeside:3:Documentation:Developer/FS/cust pay|FS::cust_pay]]) | ||
+ | ; send_receipt HASHREF | OPTION => VALUE ... | ||
+ | :Sends a payment receipt for the associated payment, against this specific invoice. If there is an error, returns the error, otherwise returns false. | ||
+ | |||
+ | :See [[Freeside:3:Documentation:Developer/FS/cust pay#send receipt|"send receipt" in FS/cust pay|FS::cust_pay#send_receipt|"send_receipt" in FS::cust_pay]]. | ||
+ | |||
+ | ==BUGS== | ||
+ | Delete and replace methods. | ||
+ | |||
+ | ==SEE ALSO== | ||
+ | [[Freeside:3:Documentation:Developer/FS/cust pay|FS::cust_pay]], [[Freeside:3:Documentation:Developer/FS/cust bill|FS::cust_bill]], [[Freeside:3:Documentation:Developer/FS/Record|FS::Record]], schema.html from the base documentation. |
Latest revision as of 05:31, 10 February 2015
Contents
NAME
FS::cust_bill_pay - Object methods for cust_bill_pay records
SYNOPSIS
use FS::cust_bill_pay; $record = new FS::cust_bill_pay \%hash; $record = new FS::cust_bill_pay { 'column' => 'value' }; $error = $record->insert; $error = $new_record->replace($old_record); $error = $record->delete; $error = $record->check;
DESCRIPTION
An FS::cust_bill_pay object represents the application of a payment to a specific invoice. FS::cust_bill_pay inherits from FS::cust_bill_ApplicationCommon and FS::Record. The following fields are currently supported:
- billpaynum - primary key (assigned automatically); invnum - Invoice (see FS::cust_bill); paynum - Payment (see FS::cust_pay); amount - Amount of the payment to apply to the specific invoice.; _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
- Deletes this payment application, unless the closed flag for the parent payment (see FS::cust_pay) is set.
- replace OLD_RECORD
- Currently unimplemented (accounting reasons).
- check
- Checks all fields to make sure this is a valid payment application. If there is an error, returns the error, otherwise returns false. Called by the insert method.
- cust_pay
- Returns the payment (see FS::cust_pay)
- send_receipt HASHREF | OPTION => VALUE ...
- Sends a payment receipt for the associated payment, against this specific invoice. If there is an error, returns the error, otherwise returns false.
BUGS
Delete and replace methods.
SEE ALSO
FS::cust_pay, FS::cust_bill, FS::Record, schema.html from the base documentation.