summaryrefslogtreecommitdiff
path: root/httemplate/misc/confirm-censustract.html
diff options
context:
space:
mode:
Diffstat (limited to 'httemplate/misc/confirm-censustract.html')
-rw-r--r--httemplate/misc/confirm-censustract.html5
1 files changed, 3 insertions, 2 deletions
diff --git a/httemplate/misc/confirm-censustract.html b/httemplate/misc/confirm-censustract.html
index ae0ae3a6a..6a11617e7 100644
--- a/httemplate/misc/confirm-censustract.html
+++ b/httemplate/misc/confirm-censustract.html
@@ -61,12 +61,13 @@ warn $cgi->param('q') if $DEBUG;
my $q = decode_json($cgi->param('q'))
or die "bad argument '".$cgi->param('q')."'";
+my $pre = $q->{'same'} ? 'bill_' : 'ship_';
my %location = (
- map { $_ => $q->{'ship_'.$_} }
+ map { $_ => $q->{$pre.$_} }
qw( company address1 address2 city state zip country latitude longitude )
);
-my $old_tract = $q->{'ship_censustract'};
+my $old_tract = $q->{$pre.'censustract'};
my $cache = eval { FS::GeocodeCache->new(%location) };
$cache->set_censustract;
my $year = FS::Conf->new->config('census_year');