[freeside-commits] branch master updated. 63488b6ec28a6546bb8d43b7b1273d0362d99b57

Christopher Burger burgerc at freeside.biz
Tue Oct 23 07:07:14 PDT 2018


The branch, master has been updated
       via  63488b6ec28a6546bb8d43b7b1273d0362d99b57 (commit)
      from  ae40f1d7aa1a0fcf8c32c60660a51de3551854d8 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 63488b6ec28a6546bb8d43b7b1273d0362d99b57
Author: Christopher Burger <burgerc at freeside.biz>
Date:   Tue Oct 23 10:06:37 2018 -0400

    RT# 71289 - fixed duplicate contact changes in customer history

diff --git a/httemplate/view/cust_main/change_history.html b/httemplate/view/cust_main/change_history.html
index 4ff604d7a..11777b54c 100644
--- a/httemplate/view/cust_main/change_history.html
+++ b/httemplate/view/cust_main/change_history.html
@@ -151,7 +151,7 @@ foreach my $table ( keys %tables ) {
   elsif ($table eq 'contact') {
 
     my $contact_addl_from = "
-      INNER JOIN (select contactnum, min(history_date) as min_history_date, max(history_date) as max_history_date FROM h_cust_contact WHERE custnum = ".$cust_main->custnum." AND history_date >= $newer_than GROUP BY contactnum) a ON h_cust_contact.contactnum = a.contactnum
+      INNER JOIN (select contactnum, min(history_date) as min_history_date, max(history_date) as max_history_date, max(historynum) as max_historynum FROM h_cust_contact WHERE custnum = ".$cust_main->custnum." AND history_date >= $newer_than GROUP BY contactnum) a ON h_cust_contact.contactnum = a.contactnum
     ";
 
     ## get list with add and remove dates of contacts for customer
@@ -159,7 +159,7 @@ foreach my $table ( keys %tables ) {
       'table' => "h_cust_contact",
       'select' => "a.contactnum, a.min_history_date, a.max_history_date, history_action AS max_history_action",
       'addl_from' => $contact_addl_from,
-      'extra_sql' => " WHERE history_date = a.max_history_date",
+      'extra_sql' => " WHERE historynum = a.max_historynum",
     });
 
     foreach my $c (@h_cust_contacts) {

-----------------------------------------------------------------------

Summary of changes:
 httemplate/view/cust_main/change_history.html | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)




More information about the freeside-commits mailing list