X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=FS%2FFS%2Fcust_main%2FSearch.pm;h=091be9956acf0637bab595ad2a64eff3c541b199;hb=1370d9061f191fa7e62e89e128263f7c128ee8f1;hp=c2620bdfa390d043ce1c9c397da125be479b39d6;hpb=bf62797c5ca86fc7dce62ca2b371bbeb2dacac89;p=freeside.git 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,