X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=blobdiff_plain;f=httemplate%2Fmisc%2Fstates.cgi;h=02b7be4aff21a9a05ebc91e4add1cf9065c518f2;hp=cff2c9774aa512525a216e4c7acb7648643e64c5;hb=75e11f1d1a5ced24496b5732e290f7762403feb8;hpb=673b9a458d9138523026963df6fa3b4683e09bae diff --git a/httemplate/misc/states.cgi b/httemplate/misc/states.cgi index cff2c9774..02b7be4af 100644 --- a/httemplate/misc/states.cgi +++ b/httemplate/misc/states.cgi @@ -1,16 +1,7 @@ -<% +[ <% join(', ', map { qq("$_") } @output) %> ] +<%init> - my $country = $cgi->param('arg'); +my $country = $cgi->param('arg'); +my @output = states_hash($country); - my @states = - sort - map { s/[\n\r]//g; $_; } - map { $_->state; } - qsearch( 'cust_main_county', - { 'country' => $country }, - 'DISTINCT ON ( state ) *', - ) - ; - - -%>[ <%= join(', ', map { qq("$_") } @states) %> ] +