package cust_main_special; require 5.006; use strict; use vars qw( @ISA $DEBUG $me $conf ); use Safe; use Carp; use Data::Dumper; use Date::Format; use FS::UID qw( dbh ); use FS::Record qw( qsearchs qsearch ); use FS::payby; use FS::cust_pkg; 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_main_county; use FS::cust_location; use FS::tax_rate; use FS::cust_tax_location; use FS::part_pkg_taxrate; use FS::queue; use FS::part_pkg; @ISA = qw ( FS::cust_main ); $DEBUG = 0; $me = '[emergency billing program]'; $conf = new FS::Conf; =head1 METHODS =over 4 =item bill OPTIONS Generates invoices (see L) for this customer. Usually used in conjunction with the collect method by calling B. If there is an error, returns the error, otherwise returns false. Options are passed as name-value pairs. Currently available options are: =over 4 =item resetup If set true, re-charges setup fees. =item time 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: use Date::Parse; ... $cust_main->bill( 'time' => str2time('April 20th, 2001') ); =item pkg_list An array ref of specific packages (objects) to attempt billing, instead trying all of them. $cust_main->bill( pkg_list => [$pkg1, $pkg2] ); =item invoice_time Used in conjunction with the I