X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=httemplate%2Fmisc%2Fcounties.cgi;h=c022a27d98b843f00973df980525d6593231ca6d;hb=95502dabd865c34d1483b20c583523b12fe9332d;hp=940cba7dcc1d6ea6c3f89f73a20a34a2ebce388b;hpb=8e95986bf97e83e00b0375dd1517c4bd0afb23e5;p=freeside.git diff --git a/httemplate/misc/counties.cgi b/httemplate/misc/counties.cgi index 940cba7dc..c022a27d9 100644 --- a/httemplate/misc/counties.cgi +++ b/httemplate/misc/counties.cgi @@ -1,27 +1,7 @@ [ <% join(', ', map { qq("$_") } @counties) %> ] <%init> -my $DEBUG = 0; - my( $state, $country ) = $cgi->param('arg'); - -warn "fetching counties for $state / $country \n" - if $DEBUG; - -my @counties = - sort - map { s/[\n\r]//g; $_; } - map { $_->county; } - qsearch( { - 'select' => 'DISTINCT county', - 'table' => 'cust_main_county', - 'hashref' => { 'state' => $state, - 'country' => $country, - }, - } ) -; - -warn "counties: ". join(', ', map { qq("$_") } @counties). "\n" - if $DEBUG; +my @counties = counties($state, $country);