[freeside-commits] branch FREESIDE_2_3_BRANCH updated. ab6ecc7f37a2586f7d8f48a929eccf2ea8ed93c1

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


The branch, FREESIDE_2_3_BRANCH has been updated
       via  ab6ecc7f37a2586f7d8f48a929eccf2ea8ed93c1 (commit)
      from  7858d152084bc4a7c4c469d9f38a6fedefcbab9a (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 ab6ecc7f37a2586f7d8f48a929eccf2ea8ed93c1
Author: Ivan Kohler <ivan at freeside.biz>
Date:   Tue Jun 12 15:26:57 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 b663c20..be44705 100644
--- a/FS/FS/cust_main/Search.pm
+++ b/FS/FS/cust_main/Search.pm
@@ -778,6 +778,7 @@ sub search {
   if ($params->{'flattened_pkgs'}) {
 
     #my $pkg_join = '';
+    $addl_from .= ' LEFT JOIN cust_pkg USING ( custnum ) ';
 
     if ($dbh->{Driver}->{Name} eq 'Pg') {
 
@@ -785,12 +786,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