%
% my @description = ();
% for ( my $row = 0; exists($param->{"description$row"}); $row++ ) {
-% push @description, $param->{"description$row"};
+% push @description, $param->{"description$row"}
+% if ($param->{"description$row"} =~ /\S/);
% }
-% pop @description until ($description[$#description]);
%
% $param->{"custnum"} =~ /^(\d+)$/
% or $error .= "Illegal customer number " . $param->{"custnum"} . " ";
% my $cust_main = qsearchs('cust_main', { 'custnum' => $custnum } )
% or $error .= "Unknown customer number $custnum. ";
%
-% $error ||= $cust_main->charge({ 'amount' => $amount,
-% 'pkg' => $cgi->param('pkg'),
-% 'taxclass' => $cgi->param('taxclass'),
-% 'additional' => \@description,
-% }
-% );
+% $error ||= $cust_main->charge( {
+% 'amount' => $amount,
+% 'pkg' => scalar($cgi->param('pkg')),
+% 'taxclass' => scalar($cgi->param('taxclass')),
+% 'additional' => \@description,
+% } );
% }
%
% if ( $error ) {
%
-% $cgi->param('error', "$error" );
+% $cgi->param('error', $error );
%
<% $cgi->redirect($p.'quick-charge.html?'. $cgi->query_string) %>
%
window.top.location.reload();
</SCRIPT>
</BODY></HTML>
-