4 $cgi->param('custnum') =~ /^(\d+)$/
5 or die 'illegal custnum '. $cgi->param('custnum');
8 $cgi->param('amount') =~ /^\s*(\d+(\.\d{1,2})?)\s*$/
9 or die 'illegal amount '. $cgi->param('amount');
12 my $cust_main = qsearchs('cust_main', { 'custnum' => $custnum } )
13 or die "unknown custnum $custnum";
15 my $error = $cust_main->charge(
18 '$'. sprintf("%.2f",$amount),
19 $cgi->param('taxclass')
28 print $cgi->redirect(popurl(3). "view/cust_main.cgi?$custnum" );