summaryrefslogtreecommitdiff
path: root/FS/FS
diff options
context:
space:
mode:
authorivan <ivan>2011-07-20 21:16:18 +0000
committerivan <ivan>2011-07-20 21:16:18 +0000
commita1691c2636363e4f46cefe91c8f0f961b698f44c (patch)
tree336999f47dd511aeaff5de8d274c9868a472c71a /FS/FS
parent982ded2d929bdcdfa72efa810273f3bc753bf036 (diff)
better error message for signup duplicate cards, allow editing of those customer records, RT#13744
Diffstat (limited to 'FS/FS')
-rw-r--r--FS/FS/cust_main.pm11
1 files changed, 10 insertions, 1 deletions
diff --git a/FS/FS/cust_main.pm b/FS/FS/cust_main.pm
index a5ee2321e..97b117285 100644
--- a/FS/FS/cust_main.pm
+++ b/FS/FS/cust_main.pm
@@ -1473,6 +1473,11 @@ sub replace {
&& $self->payby =~ /^(CARD|DCRD)$/
&& ( $old->payinfo eq $self->payinfo || $old->paymask eq $self->paymask );
+ local($ignore_banned_card) = 1
+ if ( $old->payby =~ /^(CARD|DCRD)$/ && $self->payby =~ /^(CARD|DCRD)$/
+ || $old->payby =~ /^(CHEK|DCHK)$/ && $self->payby =~ /^(CHEK|DCHK)$/ )
+ && ( $old->payinfo eq $self->payinfo || $old->paymask eq $self->paymask );
+
local $SIG{HUP} = 'IGNORE';
local $SIG{INT} = 'IGNORE';
local $SIG{QUIT} = 'IGNORE';
@@ -1869,7 +1874,11 @@ sub check {
if ( $ban ) {
if ( $ban->bantype eq 'warn' ) {
#or others depending on value of $ban->reason ?
- return '_duplicate_card' unless $self->override_ban_warn;
+ return '_duplicate_card'.
+ ': disabled from'. time2str('%a %h %o at %r', $ban->_date).
+ ' until '. time2str('%a %h %o at %r', $ban->_end_date).
+ ' (ban# '. $ban->bannum. ')'
+ unless $self->override_ban_warn;
} else {
return 'Banned credit card: banned on '.
time2str('%a %h %o at %r', $ban->_date).