From: Christopher Burger Date: Wed, 3 Apr 2019 14:08:11 +0000 (-0400) Subject: RT# 83090 - updated customer search to allow multiple orderbys X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=commitdiff_plain;h=9f2da34557def5325781121ba4f6ac1eb101cb77 RT# 83090 - updated customer search to allow multiple orderbys --- diff --git a/FS/FS/cust_main/Search.pm b/FS/FS/cust_main/Search.pm index 9cd870b96..7216fe604 100644 --- 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; + my $orderby = "ORDER BY cust_main.custnum"; # initialize these to prevent warnings $params = { @@ -937,7 +937,7 @@ sub search { } } - $orderby ||= "ORDER BY cust_main.$field"; + $orderby .= ", cust_main.$field"; } @@ -1115,7 +1115,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,