X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=blobdiff_plain;f=httemplate%2Fdocs%2Fman%2FFS%2Fcust_main.html;h=86e659ad0dbc149d7035c7fabcf98023f9f43ff9;hp=f8e9a8cfba676814ab70db4f253b5c48388841d9;hb=6991d4986df7fb3a6c7c49b5ae1b3713e87a16c4;hpb=f02dd9b0e5042ef000d9338089eed50988d48914 diff --git a/httemplate/docs/man/FS/cust_main.html b/httemplate/docs/man/FS/cust_main.html index f8e9a8cfb..86e659ad0 100644 --- a/httemplate/docs/man/FS/cust_main.html +++ b/httemplate/docs/man/FS/cust_main.html @@ -15,6 +15,7 @@
@cust_pkg = $record->ncancelled_pkgs;
+ @cust_pkg = $record->suspended_pkgs;+
$error = $record->bill; $error = $record->bill %options; $error = $record->bill 'time' => $time;@@ -134,6 +137,8 @@ FS::Record. The following fields are currently supported:
There is a special insert mode in which you pass a data structure to the insert -method containing FS::cust_pkg and FS::svc_tablename objects. When -running under a transactional database, all records are inserted atomicly, or -the transaction is rolled back. There should be a better explanation of this, -but until then, here's an example:
+CUST_PKG_HASHREF: If you pass a Tie::RefHash data structure to the insert +method containing FS::cust_pkg and FS::svc_tablename objects, all records +are inserted atomicly, or the transaction is rolled back. Passing an empty +hash reference is equivalent to not supplying this parameter. There should be +a better explanation of this, but until then, here's an example:
use Tie::RefHash; tie %hash, 'Tie::RefHash'; #this part is important @@ -162,6 +167,14 @@ but until then, here's an example: ... ); $cust_main->insert( \%hash );+
INVOICING_LIST_ARYREF: If you pass an arrarref to the insert method, it will +be set as the invoicing list (see invoicing_list). Errors return as +expected and rollback the entire transaction; it is not necessary to call +check_invoicing_list first. The invoicing_list is set after the records in the +CUST_PKG_HASHREF above are inserted, so it is now possible to set an +invoicing_list destination to the newly-created svc_acct. Here's an example:
++ $cust_main->insert( {}, [ $email, 'POST' ] );
This will completely remove all traces of the customer record. This is not what you want when a customer cancels service; for that, cancel all of the customer's packages (see cancel in the FS::cust_pkg manpage).
-If the customer has any packages, you need to pass a new (valid) customer -number for those packages to be transferred to.
+If the customer has any uncancelled packages, you need to pass a new (valid) +customer number for those packages to be transferred to. Cancelled packages +will be deleted. Did I mention that this is NOT what you want when a customer +cancels service and that you really should be looking see cancel in the FS::cust_pkg manpage?
You can't delete a customer with invoices (see the FS::cust_bill manpage), -or credits (see the FS::cust_credit manpage).
+or credits (see the FS::cust_credit manpage) or payments (see the FS::cust_pay manpage). -INVOICING_LIST_ARYREF: If you pass an arrarref to the insert method, it will +be set as the invoicing list (see invoicing_list). Errors return as +expected and rollback the entire transaction; it is not necessary to call +check_invoicing_list first. Here's an example:
++ $new_cust_main->replace( $old_cust_main, [ $email, 'POST' ] );
Options are passed as name-value pairs.
The only currently available option is `time', which bills the customer as if it were that time. It is specified as a UNIX timestamp; see perlfunc/``time''). Also see the Time::Local manpage and the Date::Parse manpage for conversion -functions.
+functions. For example: ++ use Date::Parse; + ... + $cust_main->bill( 'time' => str2time('April 20th, 2001') );
If there is an error, returns the error, otherwise returns false.
Depending on the value of `payby', this may print an invoice (`BILL'), charge a credit card (`CARD'), or just add any necessary (pseudo-)payment (`COMP').
If there is an error, returns the error, otherwise returns false.
+Options are passed as name-value pairs.
Currently available options are:
invoice_time - Use this time when deciding when to print invoices and late notices on those invoices. The default is now. It is specified as a UNIX timestamp; see perlfunc/``time''). Also see the Time::Local manpage and the Date::Parse manpage for conversion functions.
-batch_card - Set this true to batch cards (see the cust_pay_batch manpage). By +
batch_card - Set this true to batch cards (see the FS::cust_pay_batch manpage). By default, cards are processed immediately, which will generate an error if CyberCash is not installed.
report_badcard - Set this true if you want bad card transactions to return an error. By default, they don't.
+force_print - force printing even if invoice has been printed more than once +every 30 days, and don't increment the `printed' field.
+ #and returns the value of any remaining unapplied payments.
+
$Id: cust_main.html,v 1.1 2001-07-30 07:36:03 ivan Exp $
+$Id: cust_main.html,v 1.2 2002-01-29 16:33:15 ivan Exp $
CyberCash v2 forces us to define some variables in package main.
There should probably be a configuration file with a list of allowed credit card types.
-CyberCash is the only processor.
No multiple currency support (probably a larger project than just this module).