RT# 79284 Updated discounts UI for Change Package screen
[freeside.git] / httemplate / misc / states.cgi
index cff2c97..02b7be4 100644 (file)
@@ -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) %> ]
+</%init>