summaryrefslogtreecommitdiff
path: root/httemplate/edit/process/quick-charge.cgi
diff options
context:
space:
mode:
Diffstat (limited to 'httemplate/edit/process/quick-charge.cgi')
-rw-r--r--httemplate/edit/process/quick-charge.cgi8
1 files changed, 7 insertions, 1 deletions
diff --git a/httemplate/edit/process/quick-charge.cgi b/httemplate/edit/process/quick-charge.cgi
index 8fa57dd..827530e 100644
--- a/httemplate/edit/process/quick-charge.cgi
+++ b/httemplate/edit/process/quick-charge.cgi
@@ -27,7 +27,7 @@ $param->{"custnum"} =~ /^(\d+)$/
or $error .= "Illegal customer number " . $param->{"custnum"} . " ";
my $custnum = $1;
-$param->{"amount"} =~ /^\s*(\d+(\.\d{1,2})?)\s*$/
+$param->{"amount"} =~ /^\s*(\d*(?:\.?\d{1,2}))\s*$/
or $error .= "Illegal amount " . $param->{"amount"} . " ";
my $amount = $1;
@@ -55,6 +55,12 @@ unless ( $error ) {
$error ||= $cust_main->charge( {
'amount' => $amount,
'quantity' => $quantity,
+ 'bill_now' => scalar($cgi->param('bill_now')),
+ 'invoice_terms' => scalar($cgi->param('invoice_terms')),
+ 'start_date' => ( scalar($cgi->param('start_date'))
+ ? str2time($cgi->param('start_date'))
+ : ''
+ ),
'pkg' => scalar($cgi->param('pkg')),
'setuptax' => scalar($cgi->param('setuptax')),
'taxclass' => scalar($cgi->param('taxclass')),