projects
/
freeside.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
f9d1cb1
)
work around ffiec bug and add year 2010
author
jeff
<jeff>
Mon, 23 Aug 2010 16:35:55 +0000
(16:35 +0000)
committer
jeff
<jeff>
Mon, 23 Aug 2010 16:35:55 +0000
(16:35 +0000)
FS/FS/Conf.pm
patch
|
blob
|
history
httemplate/misc/xmlhttp-cust_main-censustract.html
patch
|
blob
|
history
diff --git
a/FS/FS/Conf.pm
b/FS/FS/Conf.pm
index
068ed97
..
8b49e9c
100644
(file)
--- a/
FS/FS/Conf.pm
+++ b/
FS/FS/Conf.pm
@@
-3185,7
+3185,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( 20
09 2008 2007 2006
) ],
+ 'select_enum' => [ qw( 20
10 2009 2008
) ],
},
{
},
{
diff --git
a/httemplate/misc/xmlhttp-cust_main-censustract.html
b/httemplate/misc/xmlhttp-cust_main-censustract.html
index
9d588d7
..
13ebf79
100644
(file)
--- a/
httemplate/misc/xmlhttp-cust_main-censustract.html
+++ b/
httemplate/misc/xmlhttp-cust_main-censustract.html
@@
-36,15
+36,20
@@
if ( $sub eq 'censustract' ) {
my $content = $res->content;
my $p = new HTML::TokeParser \$content;
my $viewstate;
my $content = $res->content;
my $p = new HTML::TokeParser \$content;
my $viewstate;
+ my $eventvalidation;
while (my $token = $p->get_tag('input') ) {
while (my $token = $p->get_tag('input') ) {
- next unless $token->[1]->{name} eq '__VIEWSTATE';
- $viewstate = $token->[1]->{value};
- last;
+ if ($token->[1]->{name} eq '__VIEWSTATE') {
+ $viewstate = $token->[1]->{value};
+ }
+ if ($token->[1]->{name} eq '__EVENTVALIDATION') {
+ $eventvalidation = $token->[1]->{value};
+ }
+ last if $viewstate && $eventvalidation;
}
}
- unless ($viewstate) {
+ unless ($viewstate
&& $eventvalidation
) {
- $error = "
no __VIEWSTATE
found";
+ $error = "
either no __VIEWSTATE or __EVENTVALIDATION
found";
} else {
} else {
@@
-52,6
+57,7
@@
if ( $sub eq 'censustract' ) {
my @ffiec_args = (
__VIEWSTATE => $viewstate,
my @ffiec_args = (
__VIEWSTATE => $viewstate,
+ __EVENTVALIDATION => $eventvalidation,
ddlbYear => $arg{year},
txtAddress => $arg{address},
txtCity => $arg{city},
ddlbYear => $arg{year},
txtAddress => $arg{address},
txtCity => $arg{city},
@@
-62,6
+68,7
@@
if ( $sub eq 'censustract' ) {
warn join("\n", @ffiec_args )
if $DEBUG;
warn join("\n", @ffiec_args )
if $DEBUG;
+ push @{ $ua->requests_redirectable }, 'POST';
$res = $ua->request( POST( $url, \@ffiec_args ) );
warn $res->as_string
if $DEBUG > 1;
$res = $ua->request( POST( $url, \@ffiec_args ) );
warn $res->as_string
if $DEBUG > 1;
@@
-74,6
+81,7
@@
if ( $sub eq 'censustract' ) {
my @id = qw( MSACode StateCode CountyCode TractCode );
$content = $res->content;
my @id = qw( MSACode StateCode CountyCode TractCode );
$content = $res->content;
+ warn $res->content if $DEBUG > 1;
$p = new HTML::TokeParser \$content;
my $prefix = 'UcGeoResult11_lb';
my $compare =
$p = new HTML::TokeParser \$content;
my $prefix = 'UcGeoResult11_lb';
my $compare =