7a3719711698c4cd8bef8e9b005ec40161d789d8
[freeside.git] / htdocs / docs / man / FS / cust_main_invoice.html
1 <HTML>
2 <HEAD>
3 <TITLE>FS::cust_main_invoice - Object methods for cust_main_invoice records</TITLE>
4 <LINK REV="made" HREF="mailto:perl@packages.debian.org">
5 </HEAD>
6
7 <BODY>
8
9 <A NAME="__index__"></A>
10 <!-- INDEX BEGIN -->
11
12 <UL>
13
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>
21 </UL>
22 <!-- INDEX END -->
23
24 <HR>
25 <P>
26 <H1><A NAME="name">NAME</A></H1>
27 <P>FS::cust_main_invoice - Object methods for cust_main_invoice records</P>
28 <P>
29 <HR>
30 <H1><A NAME="synopsis">SYNOPSIS</A></H1>
31 <PRE>
32   use FS::cust_main_invoice;</PRE>
33 <PRE>
34   $record = new FS::cust_main_invoice \%hash;
35   $record = new FS::cust_main_invoice { 'column' =&gt; 'value' };</PRE>
36 <PRE>
37   $error = $record-&gt;insert;</PRE>
38 <PRE>
39   $error = $new_record-&gt;replace($old_record);</PRE>
40 <PRE>
41   $error = $record-&gt;delete;</PRE>
42 <PRE>
43   $error = $record-&gt;check;</PRE>
44 <PRE>
45   $email_address = $record-&gt;address;</PRE>
46 <P>
47 <HR>
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>
51 <DL>
52 <DT><STRONG><A NAME="item_destnum_%2D_primary_key">destnum - primary key</A></STRONG><BR>
53 <DD>
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>
55 <DD>
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>
57 <DD>
58 </DL>
59 <P>
60 <HR>
61 <H1><A NAME="methods">METHODS</A></H1>
62 <DL>
63 <DT><STRONG><A NAME="item_new">new HASHREF</A></STRONG><BR>
64 <DD>
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>
68 <P></P>
69 <DT><STRONG><A NAME="item_insert">insert</A></STRONG><BR>
70 <DD>
71 Adds this record to the database.  If there is an error, returns the error,
72 otherwise returns false.
73 <P></P>
74 <DT><STRONG><A NAME="item_delete">delete</A></STRONG><BR>
75 <DD>
76 Delete this record from the database.
77 <P></P>
78 <DT><STRONG><A NAME="item_replace_OLD_RECORD">replace OLD_RECORD</A></STRONG><BR>
79 <DD>
80 Replaces the OLD_RECORD with this one in the database.  If there is an error,
81 returns the error, otherwise returns false.
82 <P></P>
83 <DT><STRONG><A NAME="item_check">check</A></STRONG><BR>
84 <DD>
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
87 and repalce methods.
88 <P></P>
89 <DT><STRONG><A NAME="item_checkdest">checkdest</A></STRONG><BR>
90 <DD>
91 Checks the dest field only.
92 <P></P>
93 <DT><STRONG><A NAME="item_address">address</A></STRONG><BR>
94 <DD>
95 Returns the literal email address for this record (or `POST').
96 <P></P></DL>
97 <P>
98 <HR>
99 <H1><A NAME="version">VERSION</A></H1>
100 <P>$Id: cust_main_invoice.html,v 1.3 2001-04-23 12:40:31 ivan Exp $</P>
101 <P>
102 <HR>
103 <H1><A NAME="bugs">BUGS</A></H1>
104 <P>
105 <HR>
106 <H1><A NAME="see also">SEE ALSO</A></H1>
107 <P><A HREF=".././FS/Record.html">the FS::Record manpage</A>, <A HREF=".././FS/cust_main.html">the FS::cust_main manpage</A></P>
108
109 </BODY>
110
111 </HTML>