From 1c44b800d49605b941d04726bcb60fd9015bb460 Mon Sep 17 00:00:00 2001 From: ivan Date: Fri, 24 Oct 2003 19:30:34 +0000 Subject: cvv! --- httemplate/edit/cust_main.cgi | 37 +++++++++++++++++++++++++++++++++++-- 1 file changed, 35 insertions(+), 2 deletions(-) (limited to 'httemplate/edit/cust_main.cgi') diff --git a/httemplate/edit/cust_main.cgi b/httemplate/edit/cust_main.cgi index d85d7886e..177d16ba4 100755 --- a/httemplate/edit/cust_main.cgi +++ b/httemplate/edit/cust_main.cgi @@ -39,6 +39,12 @@ if ( $cgi->param('error') ) { $query =~ /^(\d+)$/; $custnum=$1; $cust_main = qsearchs('cust_main', { 'custnum' => $custnum } ); + if ( $cust_main->dbdef_table->column('paycvv') + && length($cust_main->paycvv) ) { + my $paycvv = $cust_main->paycvv; + $paycvv =~ s/./*/g; + $cust_main->paycvv($paycvv); + } $saved_pkgpart = 0; $username = ''; $password = ''; @@ -61,7 +67,7 @@ my $action = $custnum ? 'Edit' : 'Add'; # top my $p1 = popurl(1); -print header("Customer $action", ''); +print header("Customer $action", '', ' onUnload="myclose()"'); print qq!Error: !, $error, "" if $error; @@ -400,7 +406,19 @@ if ( $payby_default eq 'HIDE' ) { print qq!Email invoice !; print "Billing type", - "", + "", '', &table("#cccccc"), ""; my($payinfo, $payname)=( @@ -416,6 +434,12 @@ if ( $payby_default eq 'HIDE' ) { 'COMP' => qq!Complimentary
${r}Approved by
${r}Exp !. expselect("COMP"), ); + if ( $cust_main->dbdef_table->column('paycvv') ) { + foreach my $payby ( grep { exists $payby{$_} } qw(CARD DCRD) ) { #1.4/1.5 bs + $payby{$payby} .= qq!
CVV2 (help!; + } + } + my( $account, $aba ) = split('@', $payinfo); my %paybychecked = ( @@ -426,6 +450,15 @@ if ( $payby_default eq 'HIDE' ) { 'COMP' => qq!Complimentary
${r}Approved by
${r}Exp !. expselect("COMP", $cust_main->paydate), ); + if ( $cust_main->dbdef_table->column('paycvv') ) { + my $paycvv = $cust_main->paycvv; + + foreach my $payby ( grep { exists $payby{$_} } qw(CARD DCRD) ) { #1.4/1.5 bs + $paybychecked{$payby} .= qq!
CVV2 (help!; + } + } + + $cust_main->payby($payby_default) unless $cust_main->payby; for (qw(CARD CHEK LECB BILL COMP)) { print qq!