2 Clickable link to bill a customer.
6 <% include( '/elements/bill.html',
17 url => $p.'view/cust_main.cgi?'.$custnum,
20 # optional, can contain any FS::cust_main::bill_and_collect options
22 bill_opts => { 'batch_card' => 'yes' },
26 <% include('/elements/progress-init.html',
28 [ 'custnum', @opt_keys ],
30 $url ? { url => $url } : { message => $message },
33 <A HREF="javascript:void(0);" onclick="javascript:<%$key%>process();"><%$label%></A>
34 <INPUT TYPE="hidden" NAME="custnum" VALUE="<%$custnum%>">
35 % foreach(@opt_keys) {
36 <INPUT TYPE="hidden" NAME="<%$_%>" VALUE="<%$bill_opts->{$_}%>">
40 my $custnum = $opt{'custnum'};
41 my $label = $opt{'label'};
42 my $formname = $opt{'formname'};
43 my $key = $formname.'bill'.$custnum;
44 my $url = $opt{'url'} || '';
45 my $message = $opt{'message'} || 'Finished!';
46 my $bill_opts = $opt{'bill_opts'} || {};
47 my @opt_keys = keys(%$bill_opts);
48 my @opt_vals = values(%$bill_opts);