[freeside-commits] branch master updated. 5c93b49cd87b0a7ea63ca2e40ee29cc1d1be13b4

Ivan Kohler ivan at freeside.biz
Mon Apr 11 15:50:17 PDT 2022


The branch, master has been updated
       via  5c93b49cd87b0a7ea63ca2e40ee29cc1d1be13b4 (commit)
      from  b2326b23cf72af64884e5e33c7b2ae586adce0bf (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 5c93b49cd87b0a7ea63ca2e40ee29cc1d1be13b4
Author: Ivan Kohler <ivan at freeside.biz>
Date:   Mon Apr 11 15:50:02 2022 -0700

    update adv. package report wrt new census data, RT#86245

diff --git a/FS/FS/cust_pkg/Search.pm b/FS/FS/cust_pkg/Search.pm
index 3e1ca820e..c5a7eb9f1 100644
--- a/FS/FS/cust_pkg/Search.pm
+++ b/FS/FS/cust_pkg/Search.pm
@@ -402,9 +402,12 @@ sub search {
     my $op = $params->{location_cust} ? '=' : '!=';
     push @where, "cust_location.locationnum $op cust_main.ship_locationnum";
   }
-  if ( $params->{location_census} xor $params->{location_nocensus} ) {
-    my $op = $params->{location_census} ? "IS NOT NULL" : "IS NULL";
-    push @where, "cust_location.censustract $op";
+  if ( $params->{location_census} ) {
+    push @where, "cust_location.censustract IS NOT NULL",
+                 "cust_location.censusyear  =  '2020'  ";
+  } elsif ( $params->{location_nocensus} ) {
+    push @where, "(    cust_location.censustract IS NULL    ".
+                 "  OR cust_location.censusyear  != '2020' )";
   }
   if ( $params->{location_geocode} xor $params->{location_nogeocode} ) {
     my $op = $params->{location_geocode} ? "IS NOT NULL" : "IS NULL";
diff --git a/httemplate/search/report_cust_pkg.html b/httemplate/search/report_cust_pkg.html
index 4e17d1f51..a976ef972 100755
--- a/httemplate/search/report_cust_pkg.html
+++ b/httemplate/search/report_cust_pkg.html
@@ -266,8 +266,8 @@
                 'options' => \@location_options,
                 'labels'  => { 'cust'     => "is the customer's default location",
                                'nocust'   => "is not the customer's default location",
-                               'census'   => "has a census tract",
-                               'nocensus' => "does not have a census tract",
+                               'census'   => "has an up-to-date census tract",
+                               'nocensus' => "does not have an up-to-date census tract",
                                'nogeocode'=> 'has an implicit tax location',
                                'geocode'  => 'has a hardcoded tax location',
                              },

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

Summary of changes:
 FS/FS/cust_pkg/Search.pm               | 9 ++++++---
 httemplate/search/report_cust_pkg.html | 4 ++--
 2 files changed, 8 insertions(+), 5 deletions(-)




More information about the freeside-commits mailing list