X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=httemplate%2Fmisc%2Fconfirm-censustract.html;h=6a11617e71ec25cca878524ab9e7923d4b3f1b65;hb=2bb7db96a07599e980323c1b6b23a8c79cc17a9a;hp=ae0ae3a6ad9636de8dd555d3c84de95bf256f899;hpb=e32344effc97e76f9ee26fbf4ee206bfaee47a54;p=freeside.git 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');