projects
/
freeside.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
94a109c
)
RT# 77532 - search count is now correct
author
Christopher Burger
<burgerc@freeside.biz>
Sat, 8 Dec 2018 13:55:07 +0000
(08:55 -0500)
committer
Christopher Burger
<burgerc@freeside.biz>
Sat, 8 Dec 2018 13:55:07 +0000
(08:55 -0500)
FS/FS/cust_main/Search.pm
patch
|
blob
|
history
diff --git
a/FS/FS/cust_main/Search.pm
b/FS/FS/cust_main/Search.pm
index
3e77704
..
26f6f03
100644
(file)
--- 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) ';
# (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',
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 = '';
if ($params->{'flattened_pkgs'}) {
#my $pkg_join = '';