projects
/
freeside.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
cb27e39
)
fix census tract coding, broken by 1/17/2012 update to FFIEC site, RT#16369
author
ivan
<ivan>
Thu, 9 Feb 2012 05:11:19 +0000
(
05:11
+0000)
committer
ivan
<ivan>
Thu, 9 Feb 2012 05:11:19 +0000
(
05:11
+0000)
FS/FS/Conf.pm
patch
|
blob
|
history
FS/FS/Misc/Geo.pm
patch
|
blob
|
history
diff --git
a/FS/FS/Conf.pm
b/FS/FS/Conf.pm
index
8e48dc2
..
d5dc9c6
100644
(file)
--- a/
FS/FS/Conf.pm
+++ b/
FS/FS/Conf.pm
@@
-3730,7
+3730,7
@@
and customer address. Include units.',
'section' => 'UI',
'description' => 'The year to use in census tract lookups',
'type' => 'select',
'section' => 'UI',
'description' => 'The year to use in census tract lookups',
'type' => 'select',
- 'select_enum' => [ qw( 201
0 2009 2008
) ],
+ 'select_enum' => [ qw( 201
2 2011 2010
) ],
},
{
},
{
diff --git
a/FS/FS/Misc/Geo.pm
b/FS/FS/Misc/Geo.pm
index
acfeabf
..
d7375b0
100644
(file)
--- a/
FS/FS/Misc/Geo.pm
+++ b/
FS/FS/Misc/Geo.pm
@@
-36,7
+36,7
@@
sub get_censustract {
warn Dumper($location, $year) if $DEBUG;
warn Dumper($location, $year) if $DEBUG;
- my $url
=
'http://www.ffiec.gov/Geocode/default.aspx';
+ my $url
=
'http://www.ffiec.gov/Geocode/default.aspx';
my $return = {};
my $error = '';
my $return = {};
my $error = '';
@@
-75,14
+75,11
@@
sub get_censustract {
my($zip5, $zip4) = split('-',$location->{zip});
my($zip5, $zip4) = split('-',$location->{zip});
- $year ||= '2011';
- #ugh workaround a mess at ffiec
- $year = " $year" if $year ne '2011';
+ $year ||= '2011'; #2012 per http://transition.fcc.gov/form477/techfaqs.html soon/now?
my @ffiec_args = (
__VIEWSTATE => $viewstate,
__EVENTVALIDATION => $eventvalidation,
ddlbYear => $year,
my @ffiec_args = (
__VIEWSTATE => $viewstate,
__EVENTVALIDATION => $eventvalidation,
ddlbYear => $year,
- ddlbYear => '2011', #' 2009',
txtAddress => $location->{address1},
txtCity => $location->{city},
ddlbState => $location->{state},
txtAddress => $location->{address1},
txtCity => $location->{city},
ddlbState => $location->{state},
@@
-117,7
+114,10
@@
sub get_censustract {
$return->{lc($1)} = $p->get_trimmed_text("/span");
}
$return->{lc($1)} = $p->get_trimmed_text("/span");
}
- $error = "No census tract found" unless $return->{tractcode};
+ unless ( $return->{tractcode} ) {
+ warn "$error: $content ". Dumper($return) if $DEBUG;
+ $error = "No census tract found";
+ }
$return->{tractcode} .= ' '
unless $error || $JSON::VERSION >= 2; #broken JSON 1 workaround
$return->{tractcode} .= ' '
unless $error || $JSON::VERSION >= 2; #broken JSON 1 workaround