Difference between revisions of "Freeside:1.9:Documentation:Developer/FS/cust credit bill"

From Freeside
Jump to: navigation, search
(import from POD)
(import from POD)
 
Line 20: Line 20:
 
An FS::cust_credit_bill object represents application of a credit (see [[Freeside:1.9:Documentation:Developer/FS/cust credit|FS::cust_credit]]) to an invoice (see [[Freeside:1.9:Documentation:Developer/FS/cust bill|FS::cust_bill]]). FS::cust_credit_bill inherits from FS::cust_bill_ApplicationCommon and FS::Record. The following fields are currently supported:
 
An FS::cust_credit_bill object represents application of a credit (see [[Freeside:1.9:Documentation:Developer/FS/cust credit|FS::cust_credit]]) to an invoice (see [[Freeside:1.9:Documentation:Developer/FS/cust bill|FS::cust_bill]]). FS::cust_credit_bill inherits from FS::cust_bill_ApplicationCommon and FS::Record. The following fields are currently supported:
  
; creditbillnum - primary key; crednum - credit being applied; invnum - 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.
+
; creditbillnum - primary key; crednum - credit being applied; invnum - 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:09, 3 October 2007

NAME

FS::cust_credit_bill - Object methods for cust_credit_bill records

SYNOPSIS

 use FS::cust_credit_bill;

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

 $error = $record->insert;

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

 $error = $record->delete;

 $error = $record->check;

DESCRIPTION

An FS::cust_credit_bill object represents application of a credit (see FS::cust_credit) to an invoice (see FS::cust_bill). FS::cust_credit_bill inherits from FS::cust_bill_ApplicationCommon and FS::Record. The following fields are currently supported:

creditbillnum - primary key; crednum - credit being applied; invnum - 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_credit_bill. To add the cust_credit_bill to the database, see "insert".
insert
Adds this cust_credit_bill to the database ("Posts" all or part of a credit). If there is an error, returns the error, otherwise returns false.
delete
Currently unimplemented.
replace OLD_RECORD
Application of credits may not be modified.
check
Checks all fields to make sure this is a valid credit application. If there is an error, returns the error, otherwise returns false. Called by the insert and replace methods.
sub cust_credit
Returns the credit (see FS::cust_credit)

BUGS

The delete method.

This probably should have been called cust_bill_credit.

SEE ALSO

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