fix paymask removal when editing a customer with a tokenized card, RT#74900
authorIvan Kohler <ivan@freeside.biz>
Fri, 10 Mar 2017 18:01:07 +0000 (10:01 -0800)
committerIvan Kohler <ivan@freeside.biz>
Fri, 10 Mar 2017 18:01:07 +0000 (10:01 -0800)
httemplate/edit/process/cust_main.cgi

index 4b89939..a86819f 100755 (executable)
@@ -330,6 +330,7 @@ if ( $new->custnum eq '' or $duplicate_of ) {
      )
   {
     $new->payinfo($old->payinfo);
+    $new->paymask($old->paymask) if ! $new->paymask || $new->paymask =~ /^N\/A/;
 
   } elsif ( $new->payby =~ /^(CHEK|DCHK)$/ && $new->payinfo =~ /xx/ ) {
     #fix for #3085 "edit of customer's routing code only surprisingly causes