This commit was manufactured by cvs2svn to create tag 'freeside_2_1_1'.
[freeside.git] / FS / FS / cust_main.pm
index c7a34e1..fc781d2 100644 (file)
@@ -1655,14 +1655,12 @@ sub check {
     $self->payinfo($payinfo);
     $self->paycvv('');
 
-    unless ( $ignore_banned_card ) {
-      my $ban = qsearchs('banned_pay', $self->_banned_pay_hashref);
-      if ( $ban ) {
-        return 'Banned ACH account: banned on '.
-               time2str('%a %h %o at %r', $ban->_date).
-               ' by '. $ban->otaker.
-               ' (ban# '. $ban->bannum. ')';
-      }
+    my $ban = qsearchs('banned_pay', $self->_banned_pay_hashref);
+    if ( $ban ) {
+      return 'Banned ACH account: banned on '.
+             time2str('%a %h %o at %r', $ban->_date).
+             ' by '. $ban->otaker.
+             ' (ban# '. $ban->bannum. ')';
     }
 
   } elsif ( $self->payby eq 'LECB' ) {
@@ -2415,7 +2413,6 @@ sub total_unapplied_credits {
       WHERE custnum = $custnum
   ";
 
-  #XXX fix harmless but loud: Argument "" isn't numeric in sprintf 
   sprintf( "%.2f", $self->scalar_sql($sql) );
 
 }
@@ -2454,7 +2451,6 @@ sub total_unapplied_payments {
       WHERE custnum = $custnum
   ";
 
-  #XXX fix harmless but loud: Argument "" isn't numeric in sprintf 
   sprintf( "%.2f", $self->scalar_sql($sql) );
 
 }
@@ -2493,7 +2489,6 @@ sub total_unapplied_refunds {
       WHERE custnum = $custnum
   ";
 
-  #XXX fix harmless but loud: Argument "" isn't numeric in sprintf 
   sprintf( "%.2f", $self->scalar_sql($sql) );
 
 }
@@ -4616,7 +4611,7 @@ sub _upgrade_data { #class method
 
   foreach my $sql (
     'UPDATE h_cust_main SET paycvv = NULL WHERE paycvv IS NOT NULL',
-    'UPDATE cust_main SET signupdate = (SELECT signupdate FROM h_cust_main WHERE signupdate IS NOT NULL AND h_cust_main.custnum = cust_main.custnum ORDER BY historynum DESC LIMIT 1) WHERE signupdate IS NULL',
+    'UPDATE cust_main SET signupdate = (SELECT signupdate FROM h_cust_main WHERE h_cust_main.custnum = cust_main.custnum ORDER BY historynum ASC LIMIT 1) WHERE signupdate IS NULL',
   ) {
     my $sth = dbh->prepare($sql) or die dbh->errstr;
     $sth->execute or die $sth->errstr;