[freeside-commits] branch FREESIDE_3_BRANCH updated. 1370d9061f191fa7e62e89e128263f7c128ee8f1

Christopher Burger burgerc at freeside.biz
Wed Apr 3 11:15:10 PDT 2019


The branch, FREESIDE_3_BRANCH has been updated
       via  1370d9061f191fa7e62e89e128263f7c128ee8f1 (commit)
      from  d1379237b5bc4e290fc8255726b736622e51b29f (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 1370d9061f191fa7e62e89e128263f7c128ee8f1
Author: Christopher Burger <burgerc at freeside.biz>
Date:   Wed Apr 3 10:08:11 2019 -0400

    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 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,

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

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




More information about the freeside-commits mailing list