projects
/
freeside.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(from parent 1:
ceeaad3
)
fix one time charge costs, RT#31429, RT#32894
author
Ivan Kohler
<ivan@freeside.biz>
Wed, 7 Jan 2015 22:47:50 +0000
(14:47 -0800)
committer
Ivan Kohler
<ivan@freeside.biz>
Wed, 7 Jan 2015 22:47:50 +0000
(14:47 -0800)
httemplate/edit/process/quick-charge.cgi
patch
|
blob
|
history
diff --git
a/httemplate/edit/process/quick-charge.cgi
b/httemplate/edit/process/quick-charge.cgi
index
e87be62
..
6de746e
100644
(file)
--- 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*$/ ) {