- web interface for hourly account charges!
[freeside.git] / httemplate / docs / man / FS / cust_main.html
1 <HTML>
2 <HEAD>
3 <TITLE>FS::cust_main - Object methods for cust_main 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="#subroutines">SUBROUTINES</A></LI>
19         <LI><A HREF="#version">VERSION</A></LI>
20         <LI><A HREF="#bugs">BUGS</A></LI>
21         <LI><A HREF="#see also">SEE ALSO</A></LI>
22 </UL>
23 <!-- INDEX END -->
24
25 <HR>
26 <P>
27 <H1><A NAME="name">NAME</A></H1>
28 <P>FS::cust_main - Object methods for cust_main records</P>
29 <P>
30 <HR>
31 <H1><A NAME="synopsis">SYNOPSIS</A></H1>
32 <PRE>
33   use FS::cust_main;</PRE>
34 <PRE>
35   $record = new FS::cust_main \%hash;
36   $record = new FS::cust_main { 'column' =&gt; 'value' };</PRE>
37 <PRE>
38   $error = $record-&gt;insert;</PRE>
39 <PRE>
40   $error = $new_record-&gt;replace($old_record);</PRE>
41 <PRE>
42   $error = $record-&gt;delete;</PRE>
43 <PRE>
44   $error = $record-&gt;check;</PRE>
45 <PRE>
46   @cust_pkg = $record-&gt;all_pkgs;</PRE>
47 <PRE>
48   @cust_pkg = $record-&gt;ncancelled_pkgs;</PRE>
49 <PRE>
50   @cust_pkg = $record-&gt;suspended_pkgs;</PRE>
51 <PRE>
52   $error = $record-&gt;bill;
53   $error = $record-&gt;bill %options;
54   $error = $record-&gt;bill 'time' =&gt; $time;</PRE>
55 <PRE>
56   $error = $record-&gt;collect;
57   $error = $record-&gt;collect %options;
58   $error = $record-&gt;collect 'invoice_time'   =&gt; $time,
59                             'batch_card'     =&gt; 'yes',
60                             'report_badcard' =&gt; 'yes',
61                           ;</PRE>
62 <P>
63 <HR>
64 <H1><A NAME="description">DESCRIPTION</A></H1>
65 <P>An FS::cust_main object represents a customer.  FS::cust_main inherits from 
66 FS::Record.  The following fields are currently supported:</P>
67 <DL>
68 <DT><STRONG><A NAME="item_key">custnum - primary key (assigned automatically for new customers)</A></STRONG><BR>
69 <DD>
70 <DT><STRONG><A NAME="item_agent">agentnum - agent (see <A HREF=".././FS/agent.html">the FS::agent manpage</A>)</A></STRONG><BR>
71 <DD>
72 <DT><STRONG><A NAME="item_referral">refnum - referral (see <A HREF=".././FS/part_referral.html">the FS::part_referral manpage</A>)</A></STRONG><BR>
73 <DD>
74 <DT><STRONG><A NAME="item_first_%2D_name">first - name</A></STRONG><BR>
75 <DD>
76 <DT><STRONG><A NAME="item_last_%2D_name">last - name</A></STRONG><BR>
77 <DD>
78 <DT><STRONG><A NAME="item_number">ss - social security number (optional)</A></STRONG><BR>
79 <DD>
80 <DT><STRONG><A NAME="item_company_%2D_%28optional%29">company - (optional)</A></STRONG><BR>
81 <DD>
82 <DT><STRONG><A NAME="item_address1">address1</A></STRONG><BR>
83 <DD>
84 <DT><STRONG><A NAME="item_address2_%2D_%28optional%29">address2 - (optional)</A></STRONG><BR>
85 <DD>
86 <DT><STRONG><A NAME="item_city">city</A></STRONG><BR>
87 <DD>
88 <DT><STRONG><A NAME="item_county_%2D_%28optional%2C_see_FS%3A%3Acust_main_co">county - (optional, see <A HREF=".././FS/cust_main_county.html">the FS::cust_main_county manpage</A>)</A></STRONG><BR>
89 <DD>
90 <DT><STRONG><A NAME="item_state_%2D_%28see_FS%3A%3Acust_main_county%29">state - (see <A HREF=".././FS/cust_main_county.html">the FS::cust_main_county manpage</A>)</A></STRONG><BR>
91 <DD>
92 <DT><STRONG><A NAME="item_zip">zip</A></STRONG><BR>
93 <DD>
94 <DT><STRONG><A NAME="item_country_%2D_%28see_FS%3A%3Acust_main_county%29">country - (see <A HREF=".././FS/cust_main_county.html">the FS::cust_main_county manpage</A>)</A></STRONG><BR>
95 <DD>
96 <DT><STRONG><A NAME="item_phone">daytime - phone (optional)</A></STRONG><BR>
97 <DD>
98 <DT><STRONG>night - phone (optional)</STRONG><BR>
99 <DD>
100 <DT><STRONG>fax - phone (optional)</STRONG><BR>
101 <DD>
102 <DT><STRONG><A NAME="item_ship_first_%2D_name">ship_first - name</A></STRONG><BR>
103 <DD>
104 <DT><STRONG><A NAME="item_ship_last_%2D_name">ship_last - name</A></STRONG><BR>
105 <DD>
106 <DT><STRONG><A NAME="item_ship_company_%2D_%28optional%29">ship_company - (optional)</A></STRONG><BR>
107 <DD>
108 <DT><STRONG><A NAME="item_ship_address1">ship_address1</A></STRONG><BR>
109 <DD>
110 <DT><STRONG><A NAME="item_ship_address2_%2D_%28optional%29">ship_address2 - (optional)</A></STRONG><BR>
111 <DD>
112 <DT><STRONG><A NAME="item_ship_city">ship_city</A></STRONG><BR>
113 <DD>
114 <DT><STRONG><A NAME="item_ship_county_%2D_%28optional%2C_see_FS%3A%3Acust_ma">ship_county - (optional, see <A HREF=".././FS/cust_main_county.html">the FS::cust_main_county manpage</A>)</A></STRONG><BR>
115 <DD>
116 <DT><STRONG><A NAME="item_ship_state_%2D_%28see_FS%3A%3Acust_main_county%29">ship_state - (see <A HREF=".././FS/cust_main_county.html">the FS::cust_main_county manpage</A>)</A></STRONG><BR>
117 <DD>
118 <DT><STRONG><A NAME="item_ship_zip">ship_zip</A></STRONG><BR>
119 <DD>
120 <DT><STRONG><A NAME="item_ship_country_%2D_%28see_FS%3A%3Acust_main_county%2">ship_country - (see <A HREF=".././FS/cust_main_county.html">the FS::cust_main_county manpage</A>)</A></STRONG><BR>
121 <DD>
122 <DT><STRONG>ship_daytime - phone (optional)</STRONG><BR>
123 <DD>
124 <DT><STRONG>ship_night - phone (optional)</STRONG><BR>
125 <DD>
126 <DT><STRONG>ship_fax - phone (optional)</STRONG><BR>
127 <DD>
128 <DT><STRONG><A NAME="item_payby_%2D_%60CARD%27_%28credit_cards%29%2C_%60BILL">payby - `CARD' (credit cards), `BILL' (billing), `COMP' (free), or `PREPAY' (special billing type: applies a credit - see <A HREF=".././FS/prepay_credit.html">the FS::prepay_credit manpage</A> and sets billing type to BILL)</A></STRONG><BR>
129 <DD>
130 <DT><STRONG><A NAME="item_issuer">payinfo - card number, P.O., comp issuer (4-8 lowercase alphanumerics; think username) or prepayment identifier (see <A HREF=".././FS/prepay_credit.html">the FS::prepay_credit manpage</A>)</A></STRONG><BR>
131 <DD>
132 <DT><STRONG><A NAME="item_paydate_%2D_expiration_date%2C_mm%2Fyyyy%2C_m%2Fyy">paydate - expiration date, mm/yyyy, m/yyyy, mm/yy or m/yy</A></STRONG><BR>
133 <DD>
134 <DT><STRONG><A NAME="item_payname_%2D_name_on_card_or_billing_name">payname - name on card or billing name</A></STRONG><BR>
135 <DD>
136 <DT><STRONG><A NAME="item_tax_%2D_tax_exempt%2C_empty_or_%60Y%27">tax - tax exempt, empty or `Y'</A></STRONG><BR>
137 <DD>
138 <DT><STRONG><A NAME="item_taker">otaker - order taker (assigned automatically, see <A HREF=".././FS/UID.html">the FS::UID manpage</A>)</A></STRONG><BR>
139 <DD>
140 <DT><STRONG><A NAME="item_comments">comments - comments (optional)</A></STRONG><BR>
141 <DD>
142 </DL>
143 <P>
144 <HR>
145 <H1><A NAME="methods">METHODS</A></H1>
146 <DL>
147 <DT><STRONG><A NAME="item_new">new HASHREF</A></STRONG><BR>
148 <DD>
149 Creates a new customer.  To add the customer to the database, see <A HREF="#insert">insert</A>.
150 <P>Note that this stores the hash reference, not a distinct copy of the hash it
151 points to.  You can ask the object for a copy with the <EM>hash</EM> method.</P>
152 <P></P>
153 <DT><STRONG><A NAME="item_insert_%5B_CUST_PKG_HASHREF_%5B_%2C_INVOICING_LIST">insert [ CUST_PKG_HASHREF [ , INVOICING_LIST_ARYREF ] ]</A></STRONG><BR>
154 <DD>
155 Adds this customer to the database.  If there is an error, returns the error,
156 otherwise returns false.
157 <P>CUST_PKG_HASHREF: If you pass a Tie::RefHash data structure to the insert
158 method containing FS::cust_pkg and FS::svc_<EM>tablename</EM> objects, all records
159 are inserted atomicly, or the transaction is rolled back.  Passing an empty
160 hash reference is equivalent to not supplying this parameter.  There should be
161 a better explanation of this, but until then, here's an example:</P>
162 <PRE>
163   use Tie::RefHash;
164   tie %hash, 'Tie::RefHash'; #this part is important
165   %hash = (
166     $cust_pkg =&gt; [ $svc_acct ],
167     ...
168   );
169   $cust_main-&gt;insert( \%hash );</PRE>
170 <P>INVOICING_LIST_ARYREF: If you pass an arrarref to the insert method, it will
171 be set as the invoicing list (see <A HREF="#invoicing_list">invoicing_list</A>).  Errors return as
172 expected and rollback the entire transaction; it is not necessary to call 
173 check_invoicing_list first.  The invoicing_list is set after the records in the
174 CUST_PKG_HASHREF above are inserted, so it is now possible to set an
175 invoicing_list destination to the newly-created svc_acct.  Here's an example:</P>
176 <PRE>
177   $cust_main-&gt;insert( {}, [ $email, 'POST' ] );</PRE>
178 <P></P>
179 <DT><STRONG><A NAME="item_delete_NEW_CUSTNUM">delete NEW_CUSTNUM</A></STRONG><BR>
180 <DD>
181 This deletes the customer.  If there is an error, returns the error, otherwise
182 returns false.
183 <P>This will completely remove all traces of the customer record.  This is not
184 what you want when a customer cancels service; for that, cancel all of the
185 customer's packages (see <A HREF=".././FS/cust_pkg.html#cancel">cancel in the FS::cust_pkg manpage</A>).</P>
186 <P>If the customer has any uncancelled packages, you need to pass a new (valid)
187 customer number for those packages to be transferred to.  Cancelled packages
188 will be deleted.  Did I mention that this is NOT what you want when a customer
189 cancels service and that you really should be looking see <A HREF=".././FS/cust_pkg.html#cancel">cancel in the FS::cust_pkg manpage</A>?</P>
190 <P>You can't delete a customer with invoices (see <A HREF=".././FS/cust_bill.html">the FS::cust_bill manpage</A>),
191 or credits (see <A HREF=".././FS/cust_credit.html">the FS::cust_credit manpage</A>) or payments (see <A HREF=".././FS/cust_pay.html">the FS::cust_pay manpage</A>).</P>
192 <P></P>
193 <DT><STRONG><A NAME="item_replace_OLD_RECORD_%5B_INVOICING_LIST_ARYREF_%5D">replace OLD_RECORD [ INVOICING_LIST_ARYREF ]</A></STRONG><BR>
194 <DD>
195 Replaces the OLD_RECORD with this one in the database.  If there is an error,
196 returns the error, otherwise returns false.
197 <P>INVOICING_LIST_ARYREF: If you pass an arrarref to the insert method, it will
198 be set as the invoicing list (see <A HREF="#invoicing_list">invoicing_list</A>).  Errors return as
199 expected and rollback the entire transaction; it is not necessary to call 
200 check_invoicing_list first.  Here's an example:</P>
201 <PRE>
202   $new_cust_main-&gt;replace( $old_cust_main, [ $email, 'POST' ] );</PRE>
203 <P></P>
204 <DT><STRONG><A NAME="item_check">check</A></STRONG><BR>
205 <DD>
206 Checks all fields to make sure this is a valid customer record.  If there is
207 an error, returns the error, otherwise returns false.  Called by the insert
208 and repalce methods.
209 <P></P>
210 <DT><STRONG><A NAME="item_all_pkgs">all_pkgs</A></STRONG><BR>
211 <DD>
212 Returns all packages (see <A HREF=".././FS/cust_pkg.html">the FS::cust_pkg manpage</A>) for this customer.
213 <P></P>
214 <DT><STRONG><A NAME="item_ncancelled_pkgs">ncancelled_pkgs</A></STRONG><BR>
215 <DD>
216 Returns all non-cancelled packages (see <A HREF=".././FS/cust_pkg.html">the FS::cust_pkg manpage</A>) for this customer.
217 <P></P>
218 <DT><STRONG><A NAME="item_suspended_pkgs">suspended_pkgs</A></STRONG><BR>
219 <DD>
220 Returns all suspended packages (see <A HREF=".././FS/cust_pkg.html">the FS::cust_pkg manpage</A>) for this customer.
221 <P></P>
222 <DT><STRONG><A NAME="item_unflagged_suspended_pkgs">unflagged_suspended_pkgs</A></STRONG><BR>
223 <DD>
224 Returns all unflagged suspended packages (see <A HREF=".././FS/cust_pkg.html">the FS::cust_pkg manpage</A>) for this
225 customer (thouse packages without the `manual_flag' set).
226 <P></P>
227 <DT><STRONG><A NAME="item_unsuspended_pkgs">unsuspended_pkgs</A></STRONG><BR>
228 <DD>
229 Returns all unsuspended (and uncancelled) packages (see <A HREF=".././FS/cust_pkg.html">the FS::cust_pkg manpage</A>) for
230 this customer.
231 <P></P>
232 <DT><STRONG><A NAME="item_unsuspend">unsuspend</A></STRONG><BR>
233 <DD>
234 Unsuspends all unflagged suspended packages (see <A HREF="#unflagged_suspended_pkgs">unflagged_suspended_pkgs</A>
235 and <A HREF=".././FS/cust_pkg.html">the FS::cust_pkg manpage</A>) for this customer.  Always returns a list: an empty list
236 on success or a list of errors.
237 <P></P>
238 <DT><STRONG><A NAME="item_suspend">suspend</A></STRONG><BR>
239 <DD>
240 Suspends all unsuspended packages (see <A HREF=".././FS/cust_pkg.html">the FS::cust_pkg manpage</A>) for this customer.
241 Always returns a list: an empty list on success or a list of errors.
242 <P></P>
243 <DT><STRONG><A NAME="item_cancel">cancel</A></STRONG><BR>
244 <DD>
245 Cancels all uncancelled packages (see <A HREF=".././FS/cust_pkg.html">the FS::cust_pkg manpage</A>) for this customer.
246 Always returns a list: an empty list on success or a list of errors.
247 <P></P>
248 <DT><STRONG><A NAME="item_bill">bill OPTIONS</A></STRONG><BR>
249 <DD>
250 Generates invoices (see <A HREF=".././FS/cust_bill.html">the FS::cust_bill manpage</A>) for this customer.  Usually used in
251 conjunction with the collect method.
252 <P>Options are passed as name-value pairs.</P>
253 <P>The only currently available option is `time', which bills the customer as if
254 it were that time.  It is specified as a UNIX timestamp; see
255 <EM>perlfunc/``time''</EM>).  Also see <A HREF="../Time/Local.html">the Time::Local manpage</A> and <A HREF="../Date/Parse.html">the Date::Parse manpage</A> for conversion
256 functions.  For example:</P>
257 <PRE>
258  use Date::Parse;
259  ...
260  $cust_main-&gt;bill( 'time' =&gt; str2time('April 20th, 2001') );</PRE>
261 <P>If there is an error, returns the error, otherwise returns false.</P>
262 <P></P>
263 <DT><STRONG><A NAME="item_collect">collect OPTIONS</A></STRONG><BR>
264 <DD>
265 (Attempt to) collect money for this customer's outstanding invoices (see
266 <A HREF=".././FS/cust_bill.html">the FS::cust_bill manpage</A>).  Usually used after the bill method.
267 <P>Depending on the value of `payby', this may print an invoice (`BILL'), charge
268 a credit card (`CARD'), or just add any necessary (pseudo-)payment (`COMP').</P>
269 <P>If there is an error, returns the error, otherwise returns false.</P>
270 <P>Options are passed as name-value pairs.</P>
271 <P>Currently available options are:</P>
272 <P>invoice_time - Use this time when deciding when to print invoices and
273 late notices on those invoices.  The default is now.  It is specified as a UNIX timestamp; see <EM>perlfunc/``time''</EM>).  Also see <A HREF="../Time/Local.html">the Time::Local manpage</A> and <A HREF="../Date/Parse.html">the Date::Parse manpage</A>
274 for conversion functions.</P>
275 <P>batch_card - Set this true to batch cards (see <A HREF=".././FS/cust_pay_batch.html">the FS::cust_pay_batch manpage</A>).  By
276 default, cards are processed immediately, which will generate an error if
277 CyberCash is not installed.</P>
278 <P>report_badcard - Set this true if you want bad card transactions to
279 return an error.  By default, they don't.</P>
280 <P>force_print - force printing even if invoice has been printed more than once
281 every 30 days, and don't increment the `printed' field.</P>
282 <P></P>
283 <DT><STRONG><A NAME="item_total_owed">total_owed</A></STRONG><BR>
284 <DD>
285 Returns the total owed for this customer on all invoices
286 (see <A HREF=".././FS/cust_bill.html#owed">owed in the FS::cust_bill manpage</A>).
287 <P></P>
288 <DT><STRONG><A NAME="item_total_owed_date_TIME">total_owed_date TIME</A></STRONG><BR>
289 <DD>
290 Returns the total owed for this customer on all invoices with date earlier than
291 TIME.  TIME is specified as a UNIX timestamp; see <EM>perlfunc/``time''</EM>).  Also
292 see <A HREF="../Time/Local.html">the Time::Local manpage</A> and <A HREF="../Date/Parse.html">the Date::Parse manpage</A> for conversion functions.
293 <P></P>
294 <DT><STRONG><A NAME="item_apply_credits">apply_credits</A></STRONG><BR>
295 <DD>
296 Applies (see <A HREF=".././FS/cust_credit_bill.html">the FS::cust_credit_bill manpage</A>) unapplied credits (see <A HREF=".././FS/cust_credit.html">the FS::cust_credit manpage</A>)
297 to outstanding invoice balances in chronological order and returns the value
298 of any remaining unapplied credits available for refund
299 (see <A HREF=".././FS/cust_refund.html">the FS::cust_refund manpage</A>).
300 <P></P>
301 <DT><STRONG><A NAME="item_apply_payments">apply_payments</A></STRONG><BR>
302 <DD>
303 Applies (see <A HREF=".././FS/cust_bill_pay.html">the FS::cust_bill_pay manpage</A>) unapplied payments (see <A HREF=".././FS/cust_pay.html">the FS::cust_pay manpage</A>)
304 to outstanding invoice balances in chronological order.
305 <PRE>
306  #and returns the value of any remaining unapplied payments.</PRE>
307 <P></P>
308 <DT><STRONG><A NAME="item_total_credited">total_credited</A></STRONG><BR>
309 <DD>
310 Returns the total outstanding credit (see <A HREF=".././FS/cust_credit.html">the FS::cust_credit manpage</A>) for this
311 customer.  See <A HREF=".././FS/cust_credit.html#credited">credited in the FS::cust_credit manpage</A>.
312 <P></P>
313 <DT><STRONG><A NAME="item_total_unapplied_payments">total_unapplied_payments</A></STRONG><BR>
314 <DD>
315 Returns the total unapplied payments (see <A HREF=".././FS/cust_pay.html">the FS::cust_pay manpage</A>) for this customer.
316 See <A HREF=".././FS/cust_pay.html#unapplied">unapplied in the FS::cust_pay manpage</A>.
317 <P></P>
318 <DT><STRONG><A NAME="item_balance">balance</A></STRONG><BR>
319 <DD>
320 Returns the balance for this customer (total_owed minus total_credited
321 minus total_unapplied_payments).
322 <P></P>
323 <DT><STRONG><A NAME="item_balance_date_TIME">balance_date TIME</A></STRONG><BR>
324 <DD>
325 Returns the balance for this customer, only considering invoices with date
326 earlier than TIME (total_owed_date minus total_credited minus
327 total_unapplied_payments).  TIME is specified as a UNIX timestamp; see
328 <EM>perlfunc/``time''</EM>).  Also see <A HREF="../Time/Local.html">the Time::Local manpage</A> and <A HREF="../Date/Parse.html">the Date::Parse manpage</A> for conversion
329 functions.
330 <P></P>
331 <DT><STRONG><A NAME="item_invoicing_list_%5B_ARRAYREF_%5D">invoicing_list [ ARRAYREF ]</A></STRONG><BR>
332 <DD>
333 If an arguement is given, sets these email addresses as invoice recipients
334 (see <A HREF=".././FS/cust_main_invoice.html">the FS::cust_main_invoice manpage</A>).  Errors are not fatal and are not reported
335 (except as warnings), so use check_invoicing_list first.
336 <P>Returns a list of email addresses (with svcnum entries expanded).</P>
337 <P>Note: You can clear the invoicing list by passing an empty ARRAYREF.  You can
338 check it without disturbing anything by passing nothing.</P>
339 <P>This interface may change in the future.</P>
340 <P></P>
341 <DT><STRONG><A NAME="item_check_invoicing_list_ARRAYREF">check_invoicing_list ARRAYREF</A></STRONG><BR>
342 <DD>
343 Checks these arguements as valid input for the invoicing_list method.  If there
344 is an error, returns the error, otherwise returns false.
345 <P></P>
346 <DT><STRONG><A NAME="item_default_invoicing_list">default_invoicing_list</A></STRONG><BR>
347 <DD>
348 Sets the invoicing list to all accounts associated with this customer.
349 <P></P>
350 <DT><STRONG><A NAME="item_invoicing_list_addpost">invoicing_list_addpost</A></STRONG><BR>
351 <DD>
352 Adds postal invoicing to this customer.  If this customer is already configured
353 to receive postal invoices, does nothing.
354 <P></P>
355 <DT><STRONG><A NAME="item_referral_cust_main_%5B_DEPTH_%5B_EXCLUDE_HASHREF_%">referral_cust_main [ DEPTH [ EXCLUDE_HASHREF ] ]</A></STRONG><BR>
356 <DD>
357 Returns an array of customers referred by this customer (referral_custnum set
358 to this custnum).  If DEPTH is given, recurses up to the given depth, returning
359 customers referred by customers referred by this customer and so on, inclusive.
360 The default behavior is DEPTH 1 (no recursion).
361 <P></P>
362 <DT><STRONG><A NAME="item_referral_cust_pkg_%5B_DEPTH_%5D">referral_cust_pkg [ DEPTH ]</A></STRONG><BR>
363 <DD>
364 Like referral_cust_main, except returns a flat list of all unsuspended packages
365 for each customer.  The number of items in this list may be useful for
366 comission calculations (perhaps after a grep).
367 <P></P>
368 <DT><STRONG><A NAME="item_credit">credit AMOUNT, REASON</A></STRONG><BR>
369 <DD>
370 Applies a credit to this customer.  If there is an error, returns the error,
371 otherwise returns false.
372 <P></P>
373 <DT><STRONG><A NAME="item_charge">charge AMOUNT PKG COMMENT</A></STRONG><BR>
374 <DD>
375 Creates a one-time charge for this customer.  If there is an error, returns
376 the error, otherwise returns false.
377 <P></P></DL>
378 <P>
379 <HR>
380 <H1><A NAME="subroutines">SUBROUTINES</A></H1>
381 <DL>
382 <DT><STRONG><A NAME="item_check_and_rebuild_fuzzyfiles">check_and_rebuild_fuzzyfiles</A></STRONG><BR>
383 <DD>
384 <DT><STRONG><A NAME="item_rebuild_fuzzyfiles">rebuild_fuzzyfiles</A></STRONG><BR>
385 <DD>
386 <DT><STRONG><A NAME="item_all_last">all_last</A></STRONG><BR>
387 <DD>
388 <DT><STRONG><A NAME="item_all_company">all_company</A></STRONG><BR>
389 <DD>
390 <DT><STRONG><A NAME="item_append_fuzzyfiles_LASTNAME_COMPANY">append_fuzzyfiles LASTNAME COMPANY</A></STRONG><BR>
391 <DD>
392 </DL>
393 <P>
394 <HR>
395 <H1><A NAME="version">VERSION</A></H1>
396 <P>$Id: cust_main.html,v 1.2 2002-01-29 16:33:15 ivan Exp $</P>
397 <P>
398 <HR>
399 <H1><A NAME="bugs">BUGS</A></H1>
400 <P>The delete method.</P>
401 <P>The delete method should possibly take an FS::cust_main object reference
402 instead of a scalar customer number.</P>
403 <P>Bill and collect options should probably be passed as references instead of a
404 list.</P>
405 <P>CyberCash v2 forces us to define some variables in package main.</P>
406 <P>There should probably be a configuration file with a list of allowed credit
407 card types.</P>
408 <P>No multiple currency support (probably a larger project than just this module).</P>
409 <P>
410 <HR>
411 <H1><A NAME="see also">SEE ALSO</A></H1>
412 <P><A HREF=".././FS/Record.html">the FS::Record manpage</A>, <A HREF=".././FS/cust_pkg.html">the FS::cust_pkg manpage</A>, <A HREF=".././FS/cust_bill.html">the FS::cust_bill manpage</A>, <A HREF=".././FS/cust_credit.html">the FS::cust_credit manpage</A>
413 <A HREF=".././FS/cust_pay_batch.html">the FS::cust_pay_batch manpage</A>, <A HREF=".././FS/agent.html">the FS::agent manpage</A>, <A HREF=".././FS/part_referral.html">the FS::part_referral manpage</A>,
414 <A HREF=".././FS/cust_main_county.html">the FS::cust_main_county manpage</A>, <A HREF=".././FS/cust_main_invoice.html">the FS::cust_main_invoice manpage</A>,
415 <A HREF=".././FS/UID.html">the FS::UID manpage</A>, schema.html from the base documentation.</P>
416
417 </BODY>
418
419 </HTML>