From 7e368366b4b1c3b6a2b1990f34d79a15289cadcc Mon Sep 17 00:00:00 2001 From: jeff Date: Fri, 29 May 2009 00:22:48 +0000 Subject: don't require a leading 0 in the quick charge amount --- httemplate/edit/process/quick-charge.cgi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'httemplate/edit/process/quick-charge.cgi') diff --git a/httemplate/edit/process/quick-charge.cgi b/httemplate/edit/process/quick-charge.cgi index 8fa57ddea..470cd4b5b 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; -- cgit v1.2.1 From 0376f47e1ec2ec9b8702a0e6c5146af9c66beb5e Mon Sep 17 00:00:00 2001 From: ivan Date: Tue, 30 Jun 2009 12:28:38 +0000 Subject: one-time charge "hold for later" / any package future start date, RT#5347 --- httemplate/edit/process/quick-charge.cgi | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'httemplate/edit/process/quick-charge.cgi') diff --git a/httemplate/edit/process/quick-charge.cgi b/httemplate/edit/process/quick-charge.cgi index 470cd4b5b..8f0e42471 100644 --- a/httemplate/edit/process/quick-charge.cgi +++ b/httemplate/edit/process/quick-charge.cgi @@ -55,6 +55,10 @@ unless ( $error ) { $error ||= $cust_main->charge( { 'amount' => $amount, 'quantity' => $quantity, + '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')), -- cgit v1.2.1 From bdf4497fd8d3778e9cc0f8b90dd8a742f3a84158 Mon Sep 17 00:00:00 2001 From: ivan Date: Sat, 10 Oct 2009 00:00:32 +0000 Subject: change invoice terms for one-time charges (& bill them immediately), RT#5891 --- httemplate/edit/process/quick-charge.cgi | 2 ++ 1 file changed, 2 insertions(+) (limited to 'httemplate/edit/process/quick-charge.cgi') diff --git a/httemplate/edit/process/quick-charge.cgi b/httemplate/edit/process/quick-charge.cgi index 8f0e42471..827530e50 100644 --- a/httemplate/edit/process/quick-charge.cgi +++ b/httemplate/edit/process/quick-charge.cgi @@ -55,6 +55,8 @@ 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')) : '' -- cgit v1.2.1