This commit was manufactured by cvs2svn to create tag 'freeside_2_1_0'.
[freeside.git] / FS / FS / cust_pay.pm
index 53db722..ff8226c 100644 (file)
@@ -659,7 +659,7 @@ Returns an SQL fragment to retreive the unapplied amount.
 =cut 
 
 sub unapplied_sql {
-  my ($class, $start, $end) = @_;
+  my ($class, $start, $end) = shift;
   my $bill_start   = $start ? "AND cust_bill_pay._date <= $start"   : '';
   my $bill_end     = $end   ? "AND cust_bill_pay._date > $end"     : '';
   my $refund_start = $start ? "AND cust_pay_refund._date <= $start" : '';
@@ -693,10 +693,6 @@ sub _upgrade_data {  #class method
 
   warn "$me upgrading $class\n" if $DEBUG;
 
-  ##
-  # otaker/ivan upgrade
-  ##
-
   #not the most efficient, but hey, it only has to run once
 
   my $where = "WHERE ( otaker IS NULL OR otaker = '' OR otaker = 'ivan' ) ".
@@ -752,33 +748,6 @@ sub _upgrade_data {  #class method
 
   }
 
-  ###
-  # payinfo N/A upgrade
-  ###
-
-  my @na_cust_pay = qsearch( {
-    'table'     => 'cust_pay',
-    'hashref'   => { 'payinfo' => 'N/A' },
-    'extra_sql' => "AND payby IN ( 'CARD', 'CHEK' )",
-  } );
-
-  foreach my $na ( @na_cust_pay ) {
-    my $cust_pay_pending =
-      qsearchs('cust_pay_pending', { 'paynum' => $na->paynum } );
-    $na->$_($cust_pay_pending->$_) for qw( payinfo paymask );
-    my $error = $na->replace;
-    if ( $error ) {
-      warn " *** WARNING: Error updating payinfo for payment paynum ".
-           $na->paynun. ": $error\n";
-      next;
-    }
-
-  }
-
-  ###
-  # otaker->usernum upgrade
-  ###
-
   $class->_upgrade_otaker(%opts);
 
 }