X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=blobdiff_plain;f=httemplate%2Fedit%2Fprocess%2Fcust_main.cgi;h=f75e2a6aea52362ceef2bc4cef222668ae784a96;hp=3fe7c39879949ee1c2442a4d957dcf3b0262d66b;hb=074464a707b2c8b83cc50cd0bb067660ef4d0f9f;hpb=8e5fab2148c7dc492b9fffe271c3dcf8df55b01f diff --git a/httemplate/edit/process/cust_main.cgi b/httemplate/edit/process/cust_main.cgi index 3fe7c3987..f75e2a6ae 100755 --- a/httemplate/edit/process/cust_main.cgi +++ b/httemplate/edit/process/cust_main.cgi @@ -42,8 +42,11 @@ $cgi->param('payby', $payby); if ( $payby ) { if ( $payby eq 'CHEK' || $payby eq 'DCHK' ) { - $cgi->param('payinfo', - $cgi->param('payinfo1'). '@'. $cgi->param('payinfo2') ); + my $payinfo = $cgi->param('payinfo1'). '@'; + $payinfo .= $cgi->param('payinfo3').'.' + if $conf->config('echeck-country') eq 'CA'; + $payinfo .= $cgi->param('payinfo2'); + $cgi->param('payinfo',$payinfo); } $cgi->param('paydate', $cgi->param( 'exp_month' ). '-'. $cgi->param( 'exp_year' ) ); @@ -60,9 +63,6 @@ $cgi->param('invoicing_list', join(',', @invoicing_list) ); my $new = new FS::cust_main ( { map { $_, scalar($cgi->param($_)) -# } qw(custnum agentnum last first ss company address1 address2 city county -# state zip daytime night fax payby payinfo paydate payname tax -# otaker refnum) } fields('cust_main') } ); @@ -98,7 +98,6 @@ foreach my $dfield (qw( birthdate signupdate )) { if ( $dt ) { $parsed = $dt->epoch; } else { - # $error ||= $cgi->param('birthdate') . " is an invalid birthdate:" . $parser->errmsg; $error ||= "Invalid $dfield: $value"; } @@ -162,11 +161,7 @@ if ( $new->custnum eq '' ) { 'pkgpart' => $pkgpart, 'locationnum' => scalar($cgi->param('locationnum')), } ); - #$error ||= $cust_pkg->check; - #$cust_svc = new FS::cust_svc ( { 'svcpart' => $svcpart } ); - - #$error ||= $cust_svc->check; my $part_svc = qsearchs('part_svc', { 'svcpart' => $svcpart } ); my $svcdb = $part_svc->svcdb; @@ -219,8 +214,6 @@ if ( $new->custnum eq '' ) { die "$svcdb not handled on new customer yet"; } - #$error ||= $svc_acct->check; - } use Tie::RefHash; @@ -254,9 +247,15 @@ if ( $new->custnum eq '' ) { if ($new->stateid =~ /^xxx/) { $new->stateid($old->stateid); } - if ($new->payby =~ /^(CARD|DCRD)$/ && $new->payinfo =~ /xx/) { + if ( $new->payby =~ /^(CARD|DCRD)$/ + && ( $new->payinfo =~ /xx/ + || $new->payinfo =~ /^\s*N\/A\s+\(tokenized\)\s*$/ + ) + ) + { $new->payinfo($old->payinfo); - } elsif ($new->payby =~ /^(CHEK|DCHK)$/ && $new->payinfo =~ /xx/) { + + } 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