diff options
| author | ivan <ivan> | 2008-03-27 22:04:01 +0000 | 
|---|---|---|
| committer | ivan <ivan> | 2008-03-27 22:04:01 +0000 | 
| commit | 3bffa5b44b42a3c9fe90cec5a640176ba9074a5a (patch) | |
| tree | 2e4f98705579fa674d6a6be52e56b67be8812353 | |
| parent | 69d3b12c5778255b4d4391a02c82d62b9830b4f6 (diff) | |
fixes edit if routing code only, closes: #3085
| -rwxr-xr-x | httemplate/edit/process/cust_main.cgi | 12 | 
1 files changed, 11 insertions, 1 deletions
| diff --git a/httemplate/edit/process/cust_main.cgi b/httemplate/edit/process/cust_main.cgi index be1f9aea3..f71521d2d 100755 --- a/httemplate/edit/process/cust_main.cgi +++ b/httemplate/edit/process/cust_main.cgi @@ -180,8 +180,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);    }    $error ||= $new->replace($old, \@invoicing_list); | 
