summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--FS/FS/cust_main/Search.pm6
1 files changed, 3 insertions, 3 deletions
diff --git a/FS/FS/cust_main/Search.pm b/FS/FS/cust_main/Search.pm
index c2620bdfa..091be9956 100644
--- a/FS/FS/cust_main/Search.pm
+++ b/FS/FS/cust_main/Search.pm
@@ -619,7 +619,7 @@ sub search {
my $dbh = dbh;
my @where = ();
- my $orderby;
+ my $orderby = "ORDER BY cust_main.custnum";
# initialize these to prevent warnings
$params = {
@@ -909,7 +909,7 @@ sub search {
}
}
- $orderby ||= "ORDER BY cust_main.$field";
+ $orderby .= ", cust_main.$field";
}
@@ -1120,7 +1120,7 @@ sub search {
# setup queries, subs, etc. for the search
##
- $orderby ||= 'ORDER BY custnum';
+ $orderby ||= 'ORDER BY cust_main.custnum';
# here is the agent virtualization
push @where,