NAME FS::cust_main_invoice - Object methods for cust_main_invoice records SYNOPSIS use FS::cust_main_invoice; $record = new FS::cust_main_invoice \%hash; $record = new FS::cust_main_invoice { 'column' => 'value' }; $error = $record->insert; $error = $new_record->replace($old_record); $error = $record->delete; $error = $record->check; $email_address = $record->address; DESCRIPTION An FS::cust_main_invoice object represents an invoice destination. FS::cust_main_invoice inherits from FS::Record. The following fields are currently supported: destnum - primary key custnum - customer (see the FS::cust_main manpage) dest - Invoice destination: If numeric, a svcnum, if string, a literal email address, or `POST' to enable mailing (the default if no cust_main_invoice records exist) METHODS new HASHREF Creates a new invoice destination. To add the invoice destination to the database, see the section on "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 invoice destination. If there is an error, returns the error, otherwise returns false. Called by the insert and repalce methods. checkdest Checks the dest field only. address Returns the literal email address for this record (or `POST'). VERSION $Id: cust_main_invoice.txt,v 1.1 1999-04-08 13:39:32 ivan Exp $ BUGS SEE ALSO the FS::Record manpage, the FS::cust_main manpage HISTORY ivan@voicenet.com 97-jul-1 added hfields ivan@sisd.com 97-nov-13 $Log: cust_main_invoice.txt,v $ Revision 1.1 1999-04-08 13:39:32 ivan convert from pod for 1.2.0 release Revision 1.6 1999/01/25 12:26:10 ivan yet more mod_perl stuff Revision 1.5 1999/01/18 21:58:05 ivan esthetic: eq and ne were used in a few places instead of == and != Revision 1.4 1999/01/18 09:22:42 ivan changes to track email addresses for email invoicing Revision 1.3 1998/12/29 11:59:42 ivan mostly properly OO, some work still to be done with svc_ stuff Revision 1.2 1998/12/16 09:58:53 ivan library support for editing email invoice destinations (not in sub collect yet) Revision 1.1 1998/12/16 07:40:02 ivan new table Revision 1.3 1998/11/15 04:33:00 ivan updates for newest versoin Revision 1.2 1998/11/15 03:48:49 ivan update for current version