[freeside-commits] branch FREESIDE_4_BRANCH updated. 72cbcafac03e83c15adebac5974cf5322cfcb488

Christopher Burger burgerc at freeside.biz
Sat Dec 8 06:59:10 PST 2018


The branch, FREESIDE_4_BRANCH has been updated
       via  72cbcafac03e83c15adebac5974cf5322cfcb488 (commit)
      from  8b6dc4bcaa7bed02698627e9f650e305d7c7ae69 (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 72cbcafac03e83c15adebac5974cf5322cfcb488
Author: Christopher Burger <burgerc at freeside.biz>
Date:   Sat Dec 8 08:55:07 2018 -0500

    RT# 77532 - search count is now correct

diff --git a/FS/FS/cust_main/Search.pm b/FS/FS/cust_main/Search.pm
index 3e77704e6..26f6f0394 100644
--- a/FS/FS/cust_main/Search.pm
+++ b/FS/FS/cust_main/Search.pm
@@ -1086,8 +1086,6 @@ sub search {
   #   (maybe we should be using FS::UI::Web::join_cust_main instead?)
   $addl_from .= ' LEFT JOIN (select refnum, referral from part_referral) AS part_referral_x ON (cust_main.refnum = part_referral_x.refnum) ';
 
-  my $count_query = "SELECT COUNT(*) FROM cust_main $addl_from $extra_sql";
-
   my @select = (
                  'cust_main.custnum',
                  'cust_main.salesnum',
@@ -1140,6 +1138,8 @@ sub search {
 
   }
 
+  my $count_query = "SELECT COUNT(DISTINCT cust_main.custnum) FROM cust_main $addl_from $extra_sql";
+
   if ($params->{'flattened_pkgs'}) {
 
     #my $pkg_join = '';

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

Summary of changes:
 FS/FS/cust_main/Search.pm | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)




More information about the freeside-commits mailing list