projects
/
freeside.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
doc
[freeside.git]
/
httemplate
/
edit
/
process
/
cust_main.cgi
diff --git
a/httemplate/edit/process/cust_main.cgi
b/httemplate/edit/process/cust_main.cgi
index
3700d9b
..
25c346e
100755
(executable)
--- a/
httemplate/edit/process/cust_main.cgi
+++ b/
httemplate/edit/process/cust_main.cgi
@@
-19,6
+19,8
@@
if ( $payby ) {
$cgi->param('paydate',
$cgi->param( $payby. '_month' ). '-'. $cgi->param( $payby. '_year' ) );
$cgi->param('payname', $cgi->param( $payby. '_payname' ) );
$cgi->param('paydate',
$cgi->param( $payby. '_month' ). '-'. $cgi->param( $payby. '_year' ) );
$cgi->param('payname', $cgi->param( $payby. '_payname' ) );
+ $cgi->param('paycvv', $cgi->param( $payby. '_paycvv' ) )
+ if defined $cgi->param( $payby. '_paycvv' );
}
$cgi->param('otaker', &getotaker );
}
$cgi->param('otaker', &getotaker );
@@
-27,6
+29,7
@@
my @invoicing_list = split( /\s*\,\s*/, $cgi->param('invoicing_list') );
push @invoicing_list, 'POST' if $cgi->param('invoicing_list_POST');
$cgi->param('invoicing_list', join(',', @invoicing_list) );
push @invoicing_list, 'POST' if $cgi->param('invoicing_list_POST');
$cgi->param('invoicing_list', join(',', @invoicing_list) );
+
#create new record object
my $new = new FS::cust_main ( {
#create new record object
my $new = new FS::cust_main ( {
@@
-52,7
+55,7
@@
if ( $new->custnum eq '' ) {
if ( $cgi->param('pkgpart_svcpart') ) {
my $x = $cgi->param('pkgpart_svcpart');
if ( $cgi->param('pkgpart_svcpart') ) {
my $x = $cgi->param('pkgpart_svcpart');
- $x =~ /^(\d+)_(\d+)$/;
+ $x =~ /^(\d+)_(\d+)$/
or die "illegal pkgpart_svcpart $x\n"
;
my($pkgpart, $svcpart) = ($1, $2);
#false laziness: copied from FS::cust_pkg::order (which should become a
#FS::cust_main method)
my($pkgpart, $svcpart) = ($1, $2);
#false laziness: copied from FS::cust_pkg::order (which should become a
#FS::cust_main method)
@@
-70,7
+73,7
@@
if ( $new->custnum eq '' ) {
#eslaf
# this should wind up in FS::cust_pkg!
#eslaf
# this should wind up in FS::cust_pkg!
- $error ||= "Agent ". $new->agentnum. " (type ". $agent->typenum. ") can't".
+ $error ||= "Agent ". $new->agentnum. " (type ". $agent->typenum. ") can't
".
"purchase pkgpart ". $pkgpart
#unless $part_pkg{ $pkgpart };
unless $pkgpart_href->{ $pkgpart };
"purchase pkgpart ". $pkgpart
#unless $part_pkg{ $pkgpart };
unless $pkgpart_href->{ $pkgpart };
@@
-113,6
+116,11
@@
if ( $new->custnum eq '' ) {
} else { #create old record object
my $old = qsearchs( 'cust_main', { 'custnum' => $new->custnum } );
$error ||= "Old record not found!" unless $old;
} else { #create old record object
my $old = qsearchs( 'cust_main', { 'custnum' => $new->custnum } );
$error ||= "Old record not found!" unless $old;
+ if ( defined dbdef->table('cust_main')->column('paycvv')
+ && length($old->paycvv)
+ && $new->paycvv =~ /^\s*\*+\s*$/ ) {
+ $new->paycvv($old->paycvv);
+ }
$error ||= $new->replace($old, \@invoicing_list);
}
$error ||= $new->replace($old, \@invoicing_list);
}