From 69d3ce315e8d44adef35eb32f805ceaa9b91598c Mon Sep 17 00:00:00 2001 From: Jonathan Prykop Date: Thu, 29 Jan 2015 20:38:23 -0600 Subject: RT#15413 (Duplicate rating prefixes) --- httemplate/edit/process/rate_region.cgi | 2 ++ 1 file changed, 2 insertions(+) (limited to 'httemplate/edit/process') diff --git a/httemplate/edit/process/rate_region.cgi b/httemplate/edit/process/rate_region.cgi index 87d634a62..1b271028d 100755 --- a/httemplate/edit/process/rate_region.cgi +++ b/httemplate/edit/process/rate_region.cgi @@ -25,6 +25,8 @@ my $new = new FS::rate_region ( { my $countrycode = $cgi->param('countrycode'); my @npa = split(/\s*,\s*/, $cgi->param('npa')); +my %npa = map { $_, 1 } @npa; #removing duplicates +@npa = sort keys %npa; $npa[0] = '' unless @npa; my @rate_prefix = map { #my($npa,$nxx) = split('-', $_); -- cgit v1.2.1