[freeside-commits] branch FREESIDE_3_BRANCH updated. 2581f5e097f2c4fc95902514bfe473014ce94018

Mark Wells mark at 420.am
Mon Sep 30 11:13:32 PDT 2013


The branch, FREESIDE_3_BRANCH has been updated
       via  2581f5e097f2c4fc95902514bfe473014ce94018 (commit)
      from  a577a0afcc65d143a557410f578d6b496c0c3c8d (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 2581f5e097f2c4fc95902514bfe473014ce94018
Author: Mark Wells <mark at freeside.biz>
Date:   Sat Sep 28 18:04:41 2013 -0700

    and make this work with pre-upgrade location info

diff --git a/httemplate/search/phone_state.html b/httemplate/search/phone_state.html
index 7b3acbb..67965b7 100644
--- a/httemplate/search/phone_state.html
+++ b/httemplate/search/phone_state.html
@@ -86,6 +86,10 @@ for(my $i = 0; $i < scalar(@tables); $i++) {
   # join to the preceding table if there is one, and filter out 
   # deleted records
   if ( $i > 0 ) {
+    # special case to make pre-3.x data work; remove this later
+    if ( $table eq 'cust_main' ) {
+      $last_table = 'h_cust_pkg';
+    }
     $addl_from .= "
       LEFT JOIN ( $h_table $inside ) AS $h_table
         ON ($h_table.$pkey = $last_table.$pkey)";
@@ -109,7 +113,9 @@ push @where, $curuser->agentnums_sql(
 );
 my $where = " WHERE ".join(' AND ', map "($_)", @where);
 
-my $group_field = 'h_cust_location.state';
+# for pre-3.x data
+my $group_field = 'COALESCE(h_cust_location.state, h_cust_main.ship_state, h_cust_main.state)';
+
 my @select = (
   "$group_field AS state",
   'count(DISTINCT h_svc_phone.svcnum) AS num_svcnums',

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

Summary of changes:
 httemplate/search/phone_state.html |    8 +++++++-
 1 files changed, 7 insertions(+), 1 deletions(-)




More information about the freeside-commits mailing list