diff options
Diffstat (limited to 'httemplate/edit/cust_main/choose_tax_location.html')
-rw-r--r-- | httemplate/edit/cust_main/choose_tax_location.html | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/httemplate/edit/cust_main/choose_tax_location.html b/httemplate/edit/cust_main/choose_tax_location.html index bd8b95c..ac475c5 100644 --- a/httemplate/edit/cust_main/choose_tax_location.html +++ b/httemplate/edit/cust_main/choose_tax_location.html @@ -1,5 +1,6 @@ <FORM NAME="choosegeocodeform"> <CENTER><BR><B>Choose tax location</B><BR><BR> +<P>the geocode is:<% $header %></P> <P STYLE="<% $style %>"><% $header %></P> <SELECT NAME='geocodes' ID='geocodes' STYLE="<% $style %>"> @@ -18,7 +19,7 @@ % foreach qw( city county state ); % $content .= $location->cityflag eq 'I' ? 'Y' : 'N' ; % my $selected = '' ; -% if (!$have_selected && lc($location->city) eq lc($location{city})) { +% if ($geocode && $location->geocode eq $geocode) { % $selected = 'SELECTED'; % } <OPTION VALUE="<% $value %>" STYLE="<% $style %>" <% $selected %>><% $content %> @@ -26,8 +27,8 @@ </SELECT><BR><BR> <TABLE><TR> - <TD> <BUTTON TYPE="button" onClick="set_geocode(document.getElementById('geocodes')); document.bottomform.submit();"><IMG SRC="<%$p%>images/tick.png" ALT=""> Set location </BUTTON></TD> - <TD><BUTTON TYPE="button" onClick="document.bottomform.submitButton.disabled=false; parent.cClick();"><IMG SRC="<%$p%>images/cross.png" ALT=""> Cancel submission </BUTTON></TD> + <TD> <BUTTON TYPE="button" onClick="set_geocode(document.getElementById('geocodes'));"><IMG SRC="<%$p%>images/tick.png" ALT=""> Set location </BUTTON></TD> + <TD><BUTTON TYPE="button" onClick="document.CustomerForm.submitButton.disabled=false; parent.cClick();"><IMG SRC="<%$p%>images/cross.png" ALT=""> Cancel submission </BUTTON></TD> </TR> </TABLE> @@ -36,7 +37,6 @@ <%init> my $conf = new FS::Conf; -my $have_selected = 0; my %location = (); @@ -46,6 +46,8 @@ my %location = (); ($location{zip}) = $cgi->param('zip') =~ /^([-\w ]+)$/; ($location{country}) = $cgi->param('country') =~ /^([\w ]+)$/; +my($geocode) = $cgi->param('geocode') =~ /^([\w]+)$/; + my($zip5, $zip4) = split('-', $location{zip}); #only support US & CA |