diff options
author | Ivan Kohler <ivan@freeside.biz> | 2022-02-27 16:59:18 -0800 |
---|---|---|
committer | Ivan Kohler <ivan@freeside.biz> | 2022-02-27 16:59:18 -0800 |
commit | 816b40df3a9fbc155060842999ff8edc155e91d7 (patch) | |
tree | 6f02094aa6fe9f3982377ec01b050889390d67f6 /FS/FS/cust_main | |
parent | c564754d5f17c616782fb27432e6b056bd8fa00d (diff) |
search for missing/outdated census tract, RT#86245
Diffstat (limited to 'FS/FS/cust_main')
-rw-r--r-- | FS/FS/cust_main/Search.pm | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/FS/FS/cust_main/Search.pm b/FS/FS/cust_main/Search.pm index 25216c6..37b8ec8 100644 --- a/FS/FS/cust_main/Search.pm +++ b/FS/FS/cust_main/Search.pm @@ -790,6 +790,20 @@ sub search { } ## + # no_censustract + ## + if ( $params->{'no_censustract'} ) { + push @where, "EXISTS( + SELECT 1 FROM cust_location + WHERE locationnum = cust_main.ship_locationnum + AND cust_location.country = 'US' + AND ( cust_location.censusyear IS NULL + OR cust_location.censusyear != '2020' + ) + )"; + } + + ## # phones ## |