From 3e4d22b2cd42755981754f95de97f915a31f8233 Mon Sep 17 00:00:00 2001 From: Christopher Burger Date: Mon, 26 Feb 2018 19:43:07 -0500 Subject: [PATCH] RT# 79497 - change on v3 to carry over contacts on edit customer error. V3 fix for displaying contacts in change history --- httemplate/edit/cust_main.cgi | 3 ++- httemplate/view/cust_main/change_history.html | 2 -- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/httemplate/edit/cust_main.cgi b/httemplate/edit/cust_main.cgi index fbd292ffb..7c0eb4d58 100755 --- a/httemplate/edit/cust_main.cgi +++ b/httemplate/edit/cust_main.cgi @@ -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); diff --git a/httemplate/view/cust_main/change_history.html b/httemplate/view/cust_main/change_history.html index 95fdc4e20..52edca424 100644 --- a/httemplate/view/cust_main/change_history.html +++ b/httemplate/view/cust_main/change_history.html @@ -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}, -- 2.11.0