projects
/
freeside.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
64730bd
)
RT# 83075 - fixed sorting by referrals error
author
Christopher Burger
<burgerc@freeside.biz>
Sun, 7 Apr 2019 18:46:26 +0000
(14:46 -0400)
committer
Christopher Burger
<burgerc@freeside.biz>
Mon, 8 Apr 2019 12:49:18 +0000
(08:49 -0400)
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
7216fe6
..
ae219c8
100644
(file)
--- a/
FS/FS/cust_main/Search.pm
+++ b/
FS/FS/cust_main/Search.pm
@@
-618,7
+618,7
@@
sub search {
my $dbh = dbh;
my @where = ();
- my $orderby
= "ORDER BY cust_main.custnum"
;
+ my $orderby;
# initialize these to prevent warnings
$params = {
@@
-937,7
+937,7
@@
sub search {
}
}
- $orderby
.= ",
cust_main.$field";
+ $orderby
||= "ORDER BY
cust_main.$field";
}
@@
-1213,8
+1213,7
@@
sub search {
}
- # set select a customer only once. some joins create multiple customer records.
- my $select = 'DISTINCT ON (cust_main.custnum) ' . join(', ', @select);
+ my $select = join(', ', @select);
my $sql_query = {
'table' => 'cust_main',