[freeside-commits] branch FREESIDE_3_BRANCH updated. 4b0a31271add1a8cb674968127725004a8419b21
Ivan Kohler
ivan at freeside.biz
Mon Apr 11 15:46:12 PDT 2022
The branch, FREESIDE_3_BRANCH has been updated
via 4b0a31271add1a8cb674968127725004a8419b21 (commit)
from 489e2526347375803e6154791ffb033ea0af9cf6 (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 4b0a31271add1a8cb674968127725004a8419b21
Author: Ivan Kohler <ivan at freeside.biz>
Date: Mon Apr 11 15:46:11 2022 -0700
re-try locations with missing censustract, RT#86245
diff --git a/FS/bin/freeside-censustract-update b/FS/bin/freeside-censustract-update
index 04787d650..840c3487e 100755
--- a/FS/bin/freeside-censustract-update
+++ b/FS/bin/freeside-censustract-update
@@ -34,9 +34,14 @@ my %h_cust_location = map { $_->locationnum => $_ }
# Find all locations that don't have censusyear = the current
# year as of now.
-my @cust_location = qsearch( 'cust_location',
- { censusyear => { op => '!=', value => $current_year } },
-);
+my @cust_location = qsearch({
+ 'table' => 'cust_location',
+ 'hashref' => { 'country' => 'US', },
+ 'extra_sql' => " AND ( censusyear != '$current_year'
+ OR censustract IS NULL
+ )
+ ",
+});
warn scalar(@cust_location)." records found.\n";
my $queued = 0; my $updated = 0;
@@ -83,8 +88,8 @@ freeside-censustract-update - Update census tract codes to the current year.
=head1 DESCRIPTION
Finds all customers whose census tract codes don't appear to be current
-and updates them to the current year. The "current year" is defined by
-the I<census_tract> configuration variable, not the calendar year.
+and updates them to the current year. The "current year" is 2020, unless the
+I<census_legacy> configuration variable is set.
The -d option tells the script to assume that tract codes last modified
after some date are already current. Those customers will just have
-----------------------------------------------------------------------
Summary of changes:
FS/bin/freeside-censustract-update | 15 ++++++++++-----
1 file changed, 10 insertions(+), 5 deletions(-)
More information about the freeside-commits
mailing list