don't require a leading 0 in the quick charge amount
[freeside.git] / httemplate / edit / process / quick-charge.cgi
index 8fa57dd..470cd4b 100644 (file)
@@ -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;