[freeside-commits] branch FREESIDE_3_BRANCH updated. 1178e0ec7d2789819e42966181f36bba1e6e0f4c

Ivan ivan at 420.am
Thu May 1 13:54:07 PDT 2014


The branch, FREESIDE_3_BRANCH has been updated
       via  1178e0ec7d2789819e42966181f36bba1e6e0f4c (commit)
      from  472f6aedda5898e6e0ab2b78a492d8e8e5c7cf93 (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 1178e0ec7d2789819e42966181f36bba1e6e0f4c
Author: Jason Terry <jterry at jterry-mac.local>
Date:   Thu May 1 14:41:02 2014 -0600

    Performance improvement on count location data.
    
    Conflicts:
    	FS/FS/Schema.pm

diff --git a/FS/FS/Schema.pm b/FS/FS/Schema.pm
index 849dc3e..86acbbf 100644
--- a/FS/FS/Schema.pm
+++ b/FS/FS/Schema.pm
@@ -1186,6 +1186,8 @@ sub tables_hashref {
                    [ 'referral_custnum' ],
                    [ 'payby' ], [ 'paydate' ],
                    [ 'archived' ],
+                   [ 'ship_locationnum' ],
+                   [ 'bill_locationnum' ],
                  ],
     },
 
diff --git a/FS/FS/cust_location.pm b/FS/FS/cust_location.pm
index 8412a39..2e0871d 100644
--- a/FS/FS/cust_location.pm
+++ b/FS/FS/cust_location.pm
@@ -438,8 +438,8 @@ sub disable_if_unused {
 
   my $self = shift;
   my $locationnum = $self->locationnum;
-  return '' if FS::cust_main->count('bill_locationnum = '.$locationnum)
-            or FS::cust_main->count('ship_locationnum = '.$locationnum)
+  return '' if FS::cust_main->count('bill_locationnum = '.$locationnum.' OR
+                                     ship_locationnum = '.$locationnum)
             or FS::contact->count(      'locationnum  = '.$locationnum)
             or FS::cust_pkg->count('cancel IS NULL AND 
                                          locationnum  = '.$locationnum)

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

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




More information about the freeside-commits mailing list