From 84fa358b56b89205fff99927080d5c28c01d57ff Mon Sep 17 00:00:00 2001 From: Mark Wells Date: Fri, 9 Nov 2012 17:03:41 -0800 Subject: various customer location-related fixes, #13763 --- httemplate/edit/cust_main.cgi | 18 ++++++++++-------- httemplate/edit/cust_main/bottomfixup.js | 8 ++++---- 2 files changed, 14 insertions(+), 12 deletions(-) (limited to 'httemplate/edit') diff --git a/httemplate/edit/cust_main.cgi b/httemplate/edit/cust_main.cgi index 0aded597f..be00213e2 100755 --- a/httemplate/edit/cust_main.cgi +++ b/httemplate/edit/cust_main.cgi @@ -316,8 +316,6 @@ if ( $cgi->param('error') ) { $payinfo = ''; $cgi->param('tagnum', FS::part_tag->default_tags); - $cust_main->coord_auto('Y'); - $cust_main->ship_coord_auto('Y'); if ( $cgi->param('qualnum') =~ /^(\d+)$/ ) { my $qualnum = $1; @@ -357,14 +355,18 @@ if ( $cgi->param('error') ) { my $countrydefault = $conf->config('countrydefault') || 'US'; my $statedefault = $conf->config('statedefault') || 'CA'; $cust_main->set('bill_location', - FS::cust_location->new( - { country => $countrydefault, state => $statedefault } - ) + FS::cust_location->new( { + country => $countrydefault, + state => $statedefault, + coord_auto => 'Y', + } ) ); $cust_main->set('ship_location', - FS::cust_location->new( - { country => $countrydefault, state => $statedefault } - ) + FS::cust_location->new( { + country => $countrydefault, + state => $statedefault, + coord_auto => 'Y', + } ) ); } diff --git a/httemplate/edit/cust_main/bottomfixup.js b/httemplate/edit/cust_main/bottomfixup.js index 4f3b7da42..6fc798919 100644 --- a/httemplate/edit/cust_main/bottomfixup.js +++ b/httemplate/edit/cust_main/bottomfixup.js @@ -96,11 +96,11 @@ function copyelement(from, to) { //alert(from + " (" + from.type + "): " + to.name + " => " + to.value); } -% # the value in 'censustract' is the confirmed censustract; if it's set, +% # the value in 'ship_censustract' is the confirmed censustract; if it's set, % # do nothing here function confirm_censustract() { var cf = document.CustomerForm; - if ( cf.elements['censustract'].value == '' ) { + if ( cf.elements['ship_censustract'].value == '' ) { var address_info = form_address_info(); address_info['ship_latitude'] = cf.elements['ship_latitude'].value; address_info['ship_longitude'] = cf.elements['ship_longitude'].value; @@ -120,8 +120,8 @@ function confirm_censustract() { %# called from confirm-censustract.html function set_censustract(tract, year) { var cf = document.CustomerForm; - cf.elements['censustract'].value = tract; - cf.elements['censusyear'].value = year; + cf.elements['ship_censustract'].value = tract; + cf.elements['ship_censusyear'].value = year; submit_continue(); } -- cgit v1.2.1