3 <TITLE>FS::cust_main_invoice - Object methods for cust_main_invoice records</TITLE>
4 <LINK REV="made" HREF="mailto:perl@packages.debian.org">
9 <A NAME="__index__"></A>
14 <LI><A HREF="#name">NAME</A></LI>
15 <LI><A HREF="#synopsis">SYNOPSIS</A></LI>
16 <LI><A HREF="#description">DESCRIPTION</A></LI>
17 <LI><A HREF="#methods">METHODS</A></LI>
18 <LI><A HREF="#version">VERSION</A></LI>
19 <LI><A HREF="#bugs">BUGS</A></LI>
20 <LI><A HREF="#see also">SEE ALSO</A></LI>
26 <H1><A NAME="name">NAME</A></H1>
27 <P>FS::cust_main_invoice - Object methods for cust_main_invoice records</P>
30 <H1><A NAME="synopsis">SYNOPSIS</A></H1>
32 use FS::cust_main_invoice;</PRE>
34 $record = new FS::cust_main_invoice \%hash;
35 $record = new FS::cust_main_invoice { 'column' => 'value' };</PRE>
37 $error = $record->insert;</PRE>
39 $error = $new_record->replace($old_record);</PRE>
41 $error = $record->delete;</PRE>
43 $error = $record->check;</PRE>
45 $email_address = $record->address;</PRE>
48 <H1><A NAME="description">DESCRIPTION</A></H1>
49 <P>An FS::cust_main_invoice object represents an invoice destination. FS::cust_main_invoice inherits from
50 FS::Record. The following fields are currently supported:</P>
52 <DT><STRONG><A NAME="item_destnum_%2D_primary_key">destnum - primary key</A></STRONG><BR>
54 <DT><STRONG><A NAME="item_customer">custnum - customer (see <A HREF=".././FS/cust_main.html">the FS::cust_main manpage</A>)</A></STRONG><BR>
56 <DT><STRONG><A NAME="item_svcnum">dest - Invoice destination: If numeric, a svcnum (see <A HREF=".././FS/svc_acct.html">the FS::svc_acct manpage</A>), if string, a literal email address, or `POST' to enable mailing (the default if no cust_main_invoice records exist)</A></STRONG><BR>
61 <H1><A NAME="methods">METHODS</A></H1>
63 <DT><STRONG><A NAME="item_new">new HASHREF</A></STRONG><BR>
65 Creates a new invoice destination. To add the invoice destination to the database, see <A HREF="#insert">insert</A>.
66 <P>Note that this stores the hash reference, not a distinct copy of the hash it
67 points to. You can ask the object for a copy with the <EM>hash</EM> method.</P>
69 <DT><STRONG><A NAME="item_insert">insert</A></STRONG><BR>
71 Adds this record to the database. If there is an error, returns the error,
72 otherwise returns false.
74 <DT><STRONG><A NAME="item_delete">delete</A></STRONG><BR>
76 Delete this record from the database.
78 <DT><STRONG><A NAME="item_replace_OLD_RECORD">replace OLD_RECORD</A></STRONG><BR>
80 Replaces the OLD_RECORD with this one in the database. If there is an error,
81 returns the error, otherwise returns false.
83 <DT><STRONG><A NAME="item_check">check</A></STRONG><BR>
85 Checks all fields to make sure this is a valid invoice destination. If there is
86 an error, returns the error, otherwise returns false. Called by the insert
89 <DT><STRONG><A NAME="item_checkdest">checkdest</A></STRONG><BR>
91 Checks the dest field only. If it finds that the account ends in the
92 same domain configured as the <STRONG>domain</STRONG> configuration file, it will change the
93 invoice destination from an email address to a service number (see
94 <A HREF=".././FS/svc_acct.html">the FS::svc_acct manpage</A>).
96 <DT><STRONG><A NAME="item_address">address</A></STRONG><BR>
98 Returns the literal email address for this record (or `POST').
102 <H1><A NAME="version">VERSION</A></H1>
103 <P>$Id: cust_main_invoice.html,v 1.1 2001-07-30 07:36:03 ivan Exp $</P>
106 <H1><A NAME="bugs">BUGS</A></H1>
109 <H1><A NAME="see also">SEE ALSO</A></H1>
110 <P><A HREF=".././FS/Record.html">the FS::Record manpage</A>, <A HREF=".././FS/cust_main.html">the FS::cust_main manpage</A></P>