X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=FS%2FFS%2Fcust_main.pm;h=21f66b92ed8a6564203e142011f5cbd936ed99c9;hb=5a52da30588e8811338845ce2edaf0631acad479;hp=f4b9c5993395940411764d21873f6f8442d32c5e;hpb=f0bb712b44ff110ce3441a32a5226837d34738fe;p=freeside.git diff --git a/FS/FS/cust_main.pm b/FS/FS/cust_main.pm index f4b9c5993..21f66b92e 100644 --- a/FS/FS/cust_main.pm +++ b/FS/FS/cust_main.pm @@ -2,7 +2,10 @@ package FS::cust_main; require 5.006; use strict; -use base qw( FS::otaker_Mixin FS::payinfo_Mixin FS::Record ); +use base qw( FS::cust_main::Billing FS::cust_main::Billing_Realtime + FS::otaker_Mixin FS::payinfo_Mixin FS::cust_main_Mixin + FS::Record + ); use vars qw( @EXPORT_OK $DEBUG $me $conf @encrypted_fields $import $ignore_expired_card @@ -10,7 +13,6 @@ use vars qw( @EXPORT_OK $DEBUG $me $conf @paytypes ); use vars qw( $realtime_bop_decline_quiet ); #ugh -use Safe; use Carp; use Exporter; use Scalar::Util qw( blessed ); @@ -36,10 +38,6 @@ use FS::payby; use FS::cust_pkg; use FS::cust_svc; use FS::cust_bill; -use FS::cust_bill_pkg; -use FS::cust_bill_pkg_display; -use FS::cust_bill_pkg_tax_location; -use FS::cust_bill_pkg_tax_rate_location; use FS::cust_pay; use FS::cust_pay_pending; use FS::cust_pay_void; @@ -52,15 +50,10 @@ use FS::cust_location; use FS::cust_class; use FS::cust_main_exemption; use FS::cust_tax_adjustment; -use FS::tax_rate; -use FS::tax_rate_location; use FS::cust_tax_location; -use FS::part_pkg_taxrate; use FS::agent; use FS::cust_main_invoice; use FS::cust_tag; -use FS::cust_credit_bill; -use FS::cust_bill_pay; use FS::prepay_credit; use FS::queue; use FS::part_pkg; @@ -76,7 +69,7 @@ use FS::TicketSystem; @EXPORT_OK = qw( smart_search ); -$realtime_bop_decline_quiet = 0; +$realtime_bop_decline_quiet = 0; #move to Billing_Realtime # 1 is mostly method/subroutine entry and options # 2 traces progress of some operations @@ -2663,257 +2656,200 @@ sub classname { : ''; } +=item BILLING METHODS -=item bill_and_collect - -Cancels and suspends any packages due, generates bills, applies payments and -credits, and applies collection events to run cards, send bills and notices, -etc. +Documentation on billing methods has been moved to +L. -By default, warns on errors and continues with the next operation (but see the -"fatal" flag below). +=item do_cust_event [ HASHREF | OPTION => VALUE ... ] -Options are passed as name-value pairs. Currently available options are: +Runs billing events; see L and the billing events web +interface. -=over 4 +If there is an error, returns the error, otherwise returns false. -=item time +Options are passed as name-value pairs. -Bills the customer as if it were that time. Specified as a UNIX timestamp; see L). Also see L and L for conversion functions. For example: +Currently available options are: - use Date::Parse; - ... - $cust_main->bill( 'time' => str2time('April 20th, 2001') ); +=over 4 -=item invoice_time +=item time -Used in conjunction with the I