more consistent prefix display, and don't forget nxx'
[freeside.git] / httemplate / edit / rate_region.cgi
index 04f285f..496e054 100644 (file)
@@ -29,7 +29,7 @@
       <BR><FONT SIZE="-1">(comma-separated)</FONT>
     </TD>
     <TD>
-      <TEXTAREA NAME="npa" WRAP=SOFT><% join(', ', map $_->npa, @rate_prefix ) %></TEXTAREA>
+      <TEXTAREA NAME="npa" WRAP=SOFT><% join(', ', map { $_->npa. (length($_->nxx) ? '-'.$_->nxx : '') } @rate_prefix ) %></TEXTAREA>
     </TD>
   </TR>
 
@@ -132,13 +132,7 @@ my $action = $rate_region->regionnum ? 'Edit' : 'Add';
 
 my $p1 = popurl(1);
 
-tie my %granularity, 'Tie::IxHash',
-  '1', => '1 second',
-  '6'  => '6 second',
-  '30' => '30 second', # '1/2 minute',
-  '60' => 'minute',
-  '0'  => 'call',
-;
+tie my %granularity, 'Tie::IxHash', FS::rate_detail::granularities();
 
 my @rate_prefix = $rate_region->rate_prefix;
 my $countrycode = '';