[freeside-commits] branch master updated. 43e2b6f17c5a5d49fcb553f6792b6d306be04d75

Ivan ivan at 420.am
Tue Jun 12 15:26:57 PDT 2012


The branch, master has been updated
       via  43e2b6f17c5a5d49fcb553f6792b6d306be04d75 (commit)
      from  22a1feb55c4bb705064a04646ff5c321b8112ce1 (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 43e2b6f17c5a5d49fcb553f6792b6d306be04d75
Author: Ivan Kohler <ivan at freeside.biz>
Date:   Tue Jun 12 15:26:56 2012 -0700

    fix advanced customer report Add package columns under Pg, RT#18092

diff --git a/FS/FS/cust_main/Search.pm b/FS/FS/cust_main/Search.pm
index ca4d167..8a6fa3b 100644
--- a/FS/FS/cust_main/Search.pm
+++ b/FS/FS/cust_main/Search.pm
@@ -777,6 +777,7 @@ sub search {
   if ($params->{'flattened_pkgs'}) {
 
     #my $pkg_join = '';
+    $addl_from .= ' LEFT JOIN cust_pkg USING ( custnum ) ';
 
     if ($dbh->{Driver}->{Name} eq 'Pg') {
 
@@ -784,12 +785,11 @@ 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?
       $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.";
+           "omitting package information from report.";
     }
 
     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";

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

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




More information about the freeside-commits mailing list