diff options
author | Christopher Burger <burgerc@freeside.biz> | 2018-02-26 12:00:12 -0500 |
---|---|---|
committer | Christopher Burger <burgerc@freeside.biz> | 2018-02-26 17:01:57 -0500 |
commit | cedd94d2315b9c20f939a9619ba83156e7765b8b (patch) | |
tree | 6bceba19c333c4f7f0b1688bcb8b3240a1d173e7 /httemplate/view/cust_main | |
parent | 3120e258a9a859bba3b64e493cf6d922d8b49e4c (diff) |
RT# 79497 - Changed email address check to all emails to be seperated by a space. Added contacts to change history.
Conflicts:
httemplate/edit/process/cust_main.cgi
Diffstat (limited to 'httemplate/view/cust_main')
-rw-r--r-- | httemplate/view/cust_main/change_history.html | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/httemplate/view/cust_main/change_history.html b/httemplate/view/cust_main/change_history.html index a781c7372..95fdc4e20 100644 --- a/httemplate/view/cust_main/change_history.html +++ b/httemplate/view/cust_main/change_history.html @@ -47,6 +47,7 @@ tie my %tables, 'Tie::IxHash', 'cust_pkg_discount' => 'Discount', #? it gets provisioned anyway 'phone_avail' => 'Phone', 'cust_tag' => 'Tag', + 'contact' => 'Contact', ; my $pkg_join = "JOIN cust_pkg USING ( pkgnum )"; @@ -67,6 +68,7 @@ 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); @@ -140,13 +142,16 @@ my $newer_than = int( time - $years * 31556736 ); #60*60*24*365.24 local($FS::Record::nowarn_classload) = 1; +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}, 'hashref' => { 'history_date' => { op=>'>=', value=>$newer_than }, }, - 'extra_sql' => ' AND custnum = '. $cust_main->custnum, + 'extra_sql' => $extra_sql, }); %foundsvcs = (%foundsvcs, map { $_->svcnum => 1 } @items) if $table =~ /^svc/; |