X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=httemplate%2Fedit%2Fprocess%2Fquick-charge.cgi;h=4c4927f4d26b995eabef91671a8f13d70943e6c9;hb=1203e278e2ec38fcf1468da2e4f10862004bebeb;hp=3c7cac51dd6c25211950c6a5cd47cc21f90c2435;hpb=0930d22ffc440f80c1b222b2e750cadbabd9e8f6;p=freeside.git diff --git a/httemplate/edit/process/quick-charge.cgi b/httemplate/edit/process/quick-charge.cgi index 3c7cac51d..4c4927f4d 100644 --- a/httemplate/edit/process/quick-charge.cgi +++ b/httemplate/edit/process/quick-charge.cgi @@ -30,6 +30,11 @@ $param->{"amount"} =~ /^\s*(\d+(\.\d{1,2})?)\s*$/ or $error .= "Illegal amount " . $param->{"amount"} . " "; my $amount = $1; +my $quantity = 1; +if ( $cgi->param('quantity') =~ /^\s*(\d+)\s*$/ ) { + $quantity = $1; +} + if ( $param->{'taxclass'} eq '(select)' ) { $error .= "Must select a tax class. "; } @@ -40,8 +45,10 @@ unless ( $error ) { $error ||= $cust_main->charge( { 'amount' => $amount, + 'quantity' => $quantity, 'pkg' => scalar($cgi->param('pkg')), 'taxclass' => scalar($cgi->param('taxclass')), + 'classnum' => scalar($cgi->param('classnum')), 'additional' => \@description, } ); }