[freeside-commits] branch master updated. aa6da3f37ddddf21ea5935f4e8f5fe531d18cc89

Christopher Burger burgerc at freeside.biz
Wed May 15 08:47:08 PDT 2019


The branch, master has been updated
       via  aa6da3f37ddddf21ea5935f4e8f5fe531d18cc89 (commit)
      from  cf7e1d51019f20497aac630017d2c35b427369c9 (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 aa6da3f37ddddf21ea5935f4e8f5fe531d18cc89
Author: Christopher Burger <burgerc at freeside.biz>
Date:   Wed May 15 11:46:38 2019 -0400

    RT# 83341 - added ability to sort by name in advanced customer reports

diff --git a/FS/FS/UI/Web.pm b/FS/FS/UI/Web.pm
index 9b1c16f97..b6dda8fcc 100644
--- a/FS/FS/UI/Web.pm
+++ b/FS/FS/UI/Web.pm
@@ -414,7 +414,14 @@ sub cust_sort_fields {
   cust_header(@_) if( @_ or !@cust_fields );
   #inefficientish, but tiny lists and only run once per page
 
-  map { $_ eq 'custnum' ? 'custnum' : '' } @cust_fields;
+  my @sort_fields;
+  foreach (@cust_fields) {
+    if ($_ eq "custnum") { push @sort_fields, 'custnum'; }
+    elsif ($_ eq "contact" || $_ eq "name") { push @sort_fields, '(last, first)'; }
+    elsif ($_ eq "company") { push @sort_fields, 'company'; }
+    else { push @sort_fields, ''; }
+  }
+  return @sort_fields;
 
 }
 

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

Summary of changes:
 FS/FS/UI/Web.pm | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)




More information about the freeside-commits mailing list