diff options
author | ivan <ivan> | 2006-08-23 22:25:39 +0000 |
---|---|---|
committer | ivan <ivan> | 2006-08-23 22:25:39 +0000 |
commit | 3ce7691203a7737406bf2d4442f7fd84b81f847e (patch) | |
tree | 90658b097da96772224f04771888ac6ca1a940aa /httemplate/edit/process/quick-charge.cgi | |
parent | 15e561850b61b10a92a46d8f3e316d53d4970087 (diff) |
Will things ever be the same again?
It's the final masonize
Diffstat (limited to 'httemplate/edit/process/quick-charge.cgi')
-rw-r--r-- | httemplate/edit/process/quick-charge.cgi | 76 |
1 files changed, 39 insertions, 37 deletions
diff --git a/httemplate/edit/process/quick-charge.cgi b/httemplate/edit/process/quick-charge.cgi index 928e3daad..70778c1cc 100644 --- a/httemplate/edit/process/quick-charge.cgi +++ b/httemplate/edit/process/quick-charge.cgi @@ -1,41 +1,43 @@ -<% +% +% +%#untaint custnum +%$cgi->param('custnum') =~ /^(\d+)$/ +% or die 'illegal custnum '. $cgi->param('custnum'); +%my $custnum = $1; +% +%$cgi->param('amount') =~ /^\s*(\d+(\.\d{1,2})?)\s*$/ +% or die 'illegal amount '. $cgi->param('amount'); +%my $amount = $1; +% +%my( $error, $cust_main); +%if ( $cgi->param('taxclass') eq '(select)' ) { +% +% +% $error = 'Must select a tax class'; +%} else { +% +% my $cust_main = qsearchs('cust_main', { 'custnum' => $custnum } ) +% or die "unknown custnum $custnum"; +% +% $error = $cust_main->charge( +% $amount, +% $cgi->param('pkg'), +% '$'. sprintf("%.2f",$amount), +% $cgi->param('taxclass') +% ); +% +%} +% +%if ($error) { +% -#untaint custnum -$cgi->param('custnum') =~ /^(\d+)$/ - or die 'illegal custnum '. $cgi->param('custnum'); -my $custnum = $1; - -$cgi->param('amount') =~ /^\s*(\d+(\.\d{1,2})?)\s*$/ - or die 'illegal amount '. $cgi->param('amount'); -my $amount = $1; - -my( $error, $cust_main); -if ( $cgi->param('taxclass') eq '(select)' ) { - - - $error = 'Must select a tax class'; -} else { - - my $cust_main = qsearchs('cust_main', { 'custnum' => $custnum } ) - or die "unknown custnum $custnum"; - - $error = $cust_main->charge( - $amount, - $cgi->param('pkg'), - '$'. sprintf("%.2f",$amount), - $cgi->param('taxclass') - ); - -} - -if ($error) { -%> <!-- mason kludge --> -<% - eidiot($error); -} else { - print $cgi->redirect(popurl(3). "view/cust_main.cgi?$custnum" ); -} +% +% eidiot($error); +%} else { +% print $cgi->redirect(popurl(3). "view/cust_main.cgi?$custnum" ); +%} +% +% -%> |