diff options
author | Ivan Kohler <ivan@freeside.biz> | 2015-01-07 14:47:50 -0800 |
---|---|---|
committer | Ivan Kohler <ivan@freeside.biz> | 2015-01-07 14:47:50 -0800 |
commit | dd53090fe68e2264e09a85db3d512d1baebe96b3 (patch) | |
tree | a78c9016b2c1016ac5fb8b28fcb7d4f1bb4311f3 /httemplate/edit/process/quick-charge.cgi | |
parent | ceeaad3d99869f159bf2fee490aafa4c95d03365 (diff) |
fix one time charge costs, RT#31429, RT#32894
Diffstat (limited to 'httemplate/edit/process/quick-charge.cgi')
-rw-r--r-- | httemplate/edit/process/quick-charge.cgi | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/httemplate/edit/process/quick-charge.cgi b/httemplate/edit/process/quick-charge.cgi index e87be6272..6de746ea4 100644 --- a/httemplate/edit/process/quick-charge.cgi +++ b/httemplate/edit/process/quick-charge.cgi @@ -83,9 +83,11 @@ if ( $param->{'pkgnum'} =~ /^(\d+)$/ ) { #modifying an existing one-time charge my $amount = $1; my $setup_cost = ''; - $param->{"setup_cost"} =~ /^\s*(\d*(?:\.?\d{1,2}))\s*$/ - or $error .= "Illegal setup_cost " . $param->{"setup_cost"} . " "; - my $setup_cost = $1; + if ( $param->{setup_cost} =~ /\S/ ) { + $param->{setup_cost} =~ /^\s*(\d*(?:\.?\d{1,2}))\s*$/ + or $error .= "Illegal setup_cost " . $param->{setup_cost} . " "; + $setup_cost = $1; + } my $quantity = 1; if ( $cgi->param('quantity') =~ /^\s*(\d+)\s*$/ ) { |