X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=blobdiff_plain;f=httemplate%2Fedit%2Fprocess%2Fcust_main.cgi;h=ddcb3cac82f80592333d70d514f255dbaa66ba8a;hp=b0c9e3e5702bb7b76b5a2024558c4aac2753e473;hb=a8d483fa8f540586674300da75f2b5c5b4bb7b15;hpb=42ebf5bfa6fdd1525ace6eeb7fdd5646864729a8 diff --git a/httemplate/edit/process/cust_main.cgi b/httemplate/edit/process/cust_main.cgi index b0c9e3e57..ddcb3cac8 100755 --- a/httemplate/edit/process/cust_main.cgi +++ b/httemplate/edit/process/cust_main.cgi @@ -186,8 +186,18 @@ if ( $new->custnum eq '' ) { if ($new->stateid =~ /^xxx/) { $new->stateid($old->stateid); } - if ($new->payby =~ /^(CARD|DCRD|CHEK|DCHK)$/ && $new->payinfo =~ /xx/) { + if ($new->payby =~ /^(CARD|DCRD)$/ && $new->payinfo =~ /xx/) { $new->payinfo($old->payinfo); + } elsif ($new->payby =~ /^(CHEK|DCHK)$/ && $new->payinfo =~ /xx/) { + #fix for #3085 "edit of customer's routing code only surprisingly causes + #nothing to happen... + # this probably won't do the right thing when we don't have the + # public key (can't actually get the real $old->payinfo) + my($new_account, $new_aba) = split('@', $new->payinfo); + my($old_account, $old_aba) = split('@', $old->payinfo); + $new_account = $old_account if $new_account =~ /xx/; + $new_aba = $old_aba if $new_aba =~ /xx/; + $new->payinfo($new_account.'@'.$new_aba); } warn "$me calling $new -> replace( $old, \ @invoicing_list )" if $DEBUG;