[freeside-commits] freeside/FS/FS/Misc Geo.pm,1.3,1.4

Ivan,,, ivan at wavetail.420.am
Wed Feb 8 21:11:21 PST 2012


Update of /home/cvs/cvsroot/freeside/FS/FS/Misc
In directory wavetail.420.am:/tmp/cvs-serv1694/Misc

Modified Files:
	Geo.pm 
Log Message:
fix census tract coding, broken by 1/17/2012 update to FFIEC site, RT#16369

Index: Geo.pm
===================================================================
RCS file: /home/cvs/cvsroot/freeside/FS/FS/Misc/Geo.pm,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -w -d -r1.3 -r1.4
--- Geo.pm	13 Jan 2012 10:13:56 -0000	1.3
+++ Geo.pm	9 Feb 2012 05:11:19 -0000	1.4
@@ -75,14 +75,11 @@
 
       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,
-        ddlbYear    => '2011', #' 2009',
         txtAddress  => $location->{address1},
         txtCity     => $location->{city},  
         ddlbState   => $location->{state},
@@ -117,7 +114,10 @@
           $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
 



More information about the freeside-commits mailing list