Difference between revisions of "Freeside:3:Documentation:Developer/FS/cust bill pay pkg"

From Freeside
Jump to: navigation, search
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_pkg - Object methods for cust_bill_pay_pkg records
 
  
==SYNOPSIS==
 
<code>
 
  use FS::cust_bill_pay_pkg;
 
 
  $record = new FS::cust_bill_pay_pkg \%hash;
 
  $record = new FS::cust_bill_pay_pkg { 'column' => 'value' };
 
 
  $error = $record->insert;
 
 
  $error = $new_record->replace($old_record);
 
 
  $error = $record->delete;
 
 
  $error = $record->check;
 
</code>
 
==DESCRIPTION==
 
An FS::cust_bill_pay_pkg object represents application of a payment (see [[Freeside:3:Documentation:Developer/FS/cust bill pay|FS::cust_bill_pay]]) to a specific line item within an invoice (see [[Freeside:3:Documentation:Developer/FS/cust bill pkg|FS::cust_bill_pkg]]). FS::cust_bill_pay_pkg inherits from FS::Record. The following fields are currently supported:
 
 
; billpaypkgnum - primary key; billpaynum - Payment application to the overall invoice (see [[Freeside:3:Documentation:Developer/FS/cust bill pay|FS::cust_bill_pay]]); billpkgnum - Line item to which payment is applied (see [[Freeside:3:Documentation:Developer/FS/cust bill pkg|FS::cust_bill_pkg]]); amount - Amount of the payment applied to this line item.; setuprecur - 'setup' or 'recur', designates whether the payment was applied to the setup or recurring portion of the line item.; sdate - starting date of recurring fee; edate - ending date of recurring fee
 
sdate and edate are specified as UNIX timestamps; 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"]].
 
 
:Note that this stores the hash reference, not a distinct copy of the hash it points to. You can ask the object for a copy with the ''hash'' method.
 
; insert
 
:Adds this record to the database. If there is an error, returns the error, otherwise returns false.
 
; delete
 
:Delete this record from the database.
 
; replace OLD_RECORD
 
:Replaces the OLD_RECORD with this one in the database. If there is an error, returns the error, otherwise returns false.
 
; 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 and replace methods.
 
; cust_bill_pay
 
:Returns the FS::cust_bill_pay object (payment application to the overall invoice).
 
; cust_bill_pkg
 
:Returns the FS::cust_bill_pkg object (line item to which payment is applied).
 
; send_receipt
 
:Sends a payment receipt for the associated payment, against this specific invoice and packages. If there is an error, returns the error, otherwise returns false.
 
 
==BUGS==
 
'''setuprecur''' field is a kludge to compensate for cust_bill_pkg having separate setup and recur fields. It should be removed once that's fixed.
 
 
==SEE ALSO==
 
[[Freeside:3:Documentation:Developer/FS/Record|FS::Record]], schema.html from the base documentation.
 

Revision as of 05:26, 10 February 2015