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_and_collect Cancels and suspends any packages due, generates bills, applies payments and cred Warns on errors (Does not currently: 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 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 invoice_time Used in conjunction with the I