&untaint_argv;
my %opt;
-getopts('ed:qplscbyoi', \%opt);
+getopts('ed:qpl:scbyoi', \%opt);
my $user = shift or die &usage;
adminsuidsetup $user;
if ( $opt{o} ) {
print "\n\tCollecting" unless $opt{q};
- my $error = $cust_main->collect( 'invoice_time'=>$now,
- 'batch_card' => $opt{i} ? 'no' : 'yes',
- );
+ my $error = $cust_main->collect(
+ 'invoice_time' => $now,
+ 'batch_card' => $opt{i} ? 'no' : 'yes',
+ 'force_print' => 'yes',
+ );
warn "Error collecting from customer #" . $cust_main->custnum. ":$error"
if $error;
}
}
sub usage {
- die "Usage:\n\n freeside-overdue [ -e ] [ -d days ] [ -q ] [ -p ] [ -l amount ] [ -s ] [ -c ] user\n";
+ die "Usage:\n\n freeside-overdue [ -e ] [ -d days ] [ -q ] [ -p ] [ -l amount ] [ -s ] [ -c ] [ -b ] [ -y ] [ -o [ -i ] ] user\n";
}
=head1 DESCRIPTION
+This script is deprecated in 1.4.0. You should use freeside-daily and invoice
+events instead.
+
Performs actions on overdue and/or expired accounts.
Selection options (at least one selection option is required):