permit null discount_term RT10135
[freeside.git] / FS / FS / ClientAPI / MyAccount.pm
index dbcef7d..1e1d1d3 100644 (file)
@@ -596,7 +596,7 @@ sub process_payment {
   my $amount = $1;
   return { error => 'Amount must be greater than 0' } unless $amount > 0;
 
-  $p->{'discount_term'} =~ /^\s*(\d+)\s*$/
+  $p->{'discount_term'} =~ /^\s*(\d*)\s*$/
     or return { 'error' => gettext('illegal_discount_term'). ': '. $p->{'discount_term'} };
   my $discount_term = $1;