permit null discount_term RT10135
authorjeff <jeff>
Tue, 5 Oct 2010 01:53:55 +0000 (01:53 +0000)
committerjeff <jeff>
Tue, 5 Oct 2010 01:53:55 +0000 (01:53 +0000)
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;