RT# 79497 - change on v3 to carry over contacts on edit customer error. V3 fix for...
authorChristopher Burger <burgerc@freeside.biz>
Tue, 27 Feb 2018 00:43:07 +0000 (19:43 -0500)
committerChristopher Burger <burgerc@freeside.biz>
Tue, 27 Feb 2018 00:43:07 +0000 (19:43 -0500)
httemplate/edit/cust_main.cgi
httemplate/view/cust_main/change_history.html

index fbd292f..7c0eb4d 100755 (executable)
@@ -402,7 +402,8 @@ if ( $cgi->param('error') ) {
 }
 
 my %keep = map { $_=>1 } qw( error tagnum lock_agentnum lock_pkgpart );
-$cgi->delete( grep { !$keep{$_} && $_ !~ /^tax_/ } $cgi->param );
+#$cgi->delete( grep { !$keep{$_} && $_ !~ /^tax_/ } $cgi->param );
+$cgi->delete( grep { !$keep{$_} && $_ !~ /^tax_/ && $_ !~ /^contactnum/ } $cgi->param );
 
 my $title = $custnum ? 'Edit Customer' : 'Add Customer';
 $title = mt($title);
index 95fdc4e..52edca4 100644 (file)
@@ -68,7 +68,6 @@ my %table_join = (
   'radius_usergroup' => $svc_join,
   'phone_device'     => $svc_join,
   'cust_pkg_discount'=> $pkg_join,
-  'contact'          => "JOIN cust_contact USING ( contactnum )",
 );
 
 %table_join = (%table_join, map { $_ => $svc_join } @svc_tables);
@@ -146,7 +145,6 @@ my $extra_sql = ' AND custnum = '. $cust_main->custnum;
 
 my %foundsvcs;
 foreach my $table ( keys %tables ) {
-  $extra_sql = ' AND cust_contact.custnum = '. $cust_main->custnum if $table eq 'contact';
   my @items = qsearch({
     'table'     => "h_$table",
     'addl_from' => $table_join{$table},