summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorivan <ivan>2002-04-25 01:15:33 +0000
committerivan <ivan>2002-04-25 01:15:33 +0000
commitb5124265c3f3781d0f961b836cbf674fde12ce54 (patch)
tree540e6939cf7612075123f4e33b895e992bdfcb9c
parent1ea7e2f486cdd4596567b861cfe40fa691de8c17 (diff)
don't require_cardname for non-CARD payby's
-rw-r--r--FS/FS/cust_main.pm3
1 files changed, 2 insertions, 1 deletions
diff --git a/FS/FS/cust_main.pm b/FS/FS/cust_main.pm
index 64e9b5f91..4316988ca 100644
--- a/FS/FS/cust_main.pm
+++ b/FS/FS/cust_main.pm
@@ -689,7 +689,8 @@ sub check {
return gettext('expired_card') if $y<$nowy || ( $y==$nowy && $1<$nowm );
}
- if ( $self->payname eq '' && ! $conf->exists('require_cardname') ) {
+ if ( $self->payname eq '' &&
+ ( ! $conf->exists('require_cardname') || $self->payby ne 'CARD' ) ) {
$self->payname( $self->first. " ". $self->getfield('last') );
} else {
$self->payname =~ /^([\w \,\.\-\']+)$/