[freeside-commits] branch master updated. 440a4fe4f826a59a660d744889b24eb751da675b

Ivan ivan at 420.am
Thu Mar 8 17:07:17 PST 2012


The branch, master has been updated
       via  440a4fe4f826a59a660d744889b24eb751da675b (commit)
      from  29076f9f299a582438aa731c2e0fb340837efd0d (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 440a4fe4f826a59a660d744889b24eb751da675b
Author: Ivan Kohler <ivan-debian at 420.am>
Date:   Thu Mar 8 17:07:16 2012 -0800

    fix "Add package columns" in advanced customer report under MySQL, RT#16214

diff --git a/FS/FS/cust_main/Search.pm b/FS/FS/cust_main/Search.pm
index 4da516b..c5b5ff6 100644
--- a/FS/FS/cust_main/Search.pm
+++ b/FS/FS/cust_main/Search.pm
@@ -750,7 +750,7 @@ sub search {
 
   if ($params->{'flattened_pkgs'}) {
 
-    my $pkg_join = '';
+    #my $pkg_join = '';
 
     if ($dbh->{Driver}->{Name} eq 'Pg') {
 
@@ -759,13 +759,14 @@ sub search {
     } elsif ($dbh->{Driver}->{Name} =~ /^mysql/i) {
       push @select, "GROUP_CONCAT(part_pkg.pkg SEPARATOR '|') as magic";
       $addl_from .= ' LEFT JOIN cust_pkg USING ( custnum ) '; #Pg too w/flatpkg?
-      $pkg_join  .= ' LEFT JOIN part_pkg USING ( pkgpart ) ';
+      $addl_from .= ' LEFT JOIN part_pkg USING ( pkgpart ) ';
+      #$pkg_join  .= ' LEFT JOIN part_pkg USING ( pkgpart ) ';
     } else {
       warn "warning: unknown database type ". $dbh->{Driver}->{Name}. 
            "omitting packing information from report.";
     }
 
-    my $header_query = "SELECT COUNT(cust_pkg.custnum = cust_main.custnum) AS count FROM cust_main $addl_from $pkg_join $extra_sql $pkgwhere group by cust_main.custnum order by count desc limit 1";
+    my $header_query = "SELECT COUNT(cust_pkg.custnum = cust_main.custnum) AS count FROM cust_main $addl_from $extra_sql $pkgwhere group by cust_main.custnum order by count desc limit 1";
 
     my $sth = dbh->prepare($header_query) or die dbh->errstr;
     $sth->execute() or die $sth->errstr;

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

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




More information about the freeside-commits mailing list