+ ###
+ # payinfo N/A upgrade
+ ###
+
+ #XXX remove the 'N/A (tokenized)' part (or just this entire thing)
+
+ my @na_cust_pay = qsearch( {
+ 'table' => 'cust_pay',
+ 'hashref' => {}, #could be encrypted# { 'payinfo' => 'N/A' },
+ 'extra_sql' => "WHERE ( payinfo = 'N/A' OR paymask = 'N/AA' OR paymask = 'N/A (tokenized)' ) AND payby IN ( 'CARD', 'CHEK' )",
+ } );
+
+ foreach my $na ( @na_cust_pay ) {
+
+ next unless $na->payinfo eq 'N/A';
+
+ 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
+ ###
+