4 <% $cgi->redirect(popurl(2). "view/cust_main.cgi?$custnum") %>
9 unless $FS::CurrentUser::CurrentUser->access_right('Bill customer now');
12 my($query) = $cgi->keywords;
15 my $cust_main = qsearchs('cust_main',{'custnum'=>$custnum});
16 die "Can't find customer!\n" unless $cust_main;
18 my $conf = new FS::Conf;
20 my $error = $cust_main->bill(
25 $error = $cust_main->apply_payments_and_credits
26 || $cust_main->collect(
27 #'invoice-time'=>$time,
28 #'batch_card'=> 'yes',
30 #'report_badcard'=> 'yes',
31 #'retry_card' => 'yes',
35 #this is used only by cust_main::batch_card
36 #need to pick & create an actual config
37 #value if we're going to turn this on
38 #("realtime-backend" doesn't exist,
39 # "backend-realtime" is for something
41 #'realtime' => $conf->exists('realtime-backend'),