This commit was manufactured by cvs2svn to create tag 'freeside_2_1_1'.
[freeside.git] / httemplate / edit / cust_main / bottomfixup.js
index 61d7220..5d06f3c 100644 (file)
@@ -1,5 +1,6 @@
 function bottomfixup(what) {
 
+%# ../cust_main.cgi
   var layervars = new Array(
     'payauto',
     'payinfo', 'payinfo1', 'payinfo2', 'paytype',
@@ -196,6 +197,7 @@ function post_standardization() {
 
     var country_el = cf.elements['<% $taxpre %>country'];
     var country = country_el.options[ country_el.selectedIndex ].value;
+    var geocode = cf.elements['geocode'].value;
 
     if ( country == 'CA' || country == 'US' ) {
 
@@ -208,6 +210,7 @@ function post_standardization() {
                   ";state="   + state + 
                   ";zip="     + cf.elements['<% $taxpre %>zip'].value +
                   ";country=" + country +
+                  ";geocode=" + geocode +
                   ";";
 
       // popup a chooser
@@ -222,6 +225,7 @@ function post_standardization() {
 
   } else {
 
+    cf.elements['geocode'].value = '';
     post_geocode();
 
   }
@@ -242,7 +246,7 @@ function post_geocode() {
   var cf = document.CustomerForm;
   var state_el = cf.elements['ship_state'];
   var census_data = new Array(
-    'year',   <% $conf->config('census_year') || '2008' %>,
+    'year',   <% $conf->config('census_year') || '2009' %>,
     'address', cf.elements['ship_address1'].value,
     'city',    cf.elements['ship_city'].value,
     'state',   state_el.options[ state_el.selectedIndex ].value,