Freeside:4:Documentation:Developer/FS/legacy cust bill

From Freeside
Jump to: navigation, search

NAME

FS::legacy_cust_bill - Object methods for legacy_cust_bill records

SYNOPSIS

 use FS::legacy_cust_bill;

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

 $error = $record->insert;

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

 $error = $record->delete;

 $error = $record->check;

DESCRIPTION

An FS::legacy_cust_bill object represents an invoice from a previous billing system, about which full details are not availble. Instead, the rendered content is stored in HTML or PDF format. FS::legacy_cust_bill invoices are stored for informational and display purposes only; they have no effect upon customer balances.

FS::legacy_cust_bill inherits from FS::Record. The following fields are currently supported:

legacyinvnum
primary key
legacyid
Invoice number or identifier from previous system
custnum
Customer (see FS::cust_main)
_date
Date, as a UNIX timestamp
charged
Amount charged
content_pdf
PDF content
content_html
HTML content

METHODS

new HASHREF
Creates a new legacy invoice. To add the example to the database, see "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 legacy invoice. If there is an error, returns the error, otherwise returns false. Called by the insert and replace methods.
cust_main
Returns the customer (see FS::cust_main) for this invoice.

BUGS

SEE ALSO

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

POD ERRORS

Hey! The above document had some coding errors, which are explained below:

Around line 48:
Unterminated L<...> sequence