3 %my($query) = $cgi->keywords;
6 %my $cust_main = qsearchs('cust_main',{'custnum'=>$custnum});
7 %die "Can't find customer!\n" unless $cust_main;
9 %my $conf = new FS::Conf;
11 %my $error = $cust_main->bill(
14 %#&eidiot($error) if $error;
17 % $cust_main->apply_payments;
18 % $cust_main->apply_credits;
20 % $error = $cust_main->collect(
21 % # 'invoice-time'=>$time,
22 % #'batch_card'=> 'yes',
23 % #'batch_card'=> 'no',
24 % #'report_badcard'=> 'yes',
25 % #'retry_card' => 'yes',
27 % 'realtime' => $conf->exists('realtime-backend'),
30 %#&eidiot($error) if $error;
39 % print $cgi->redirect(popurl(2). "view/cust_main.cgi?$custnum");