[freeside-commits] freeside/httemplate/misc phone_avail-import.html, 1.2.8.2, 1.2.8.3

Erik Levinson levinse at wavetail.420.am
Sat Feb 12 23:19:54 PST 2011


Update of /home/cvs/cvsroot/freeside/httemplate/misc
In directory wavetail.420.am:/tmp/cvs-serv15258/httemplate/misc

Modified Files:
      Tag: FREESIDE_2_1_BRANCH
	phone_avail-import.html 
Log Message:
bulk DID orders and inventory, RT11291

Index: phone_avail-import.html
===================================================================
RCS file: /home/cvs/cvsroot/freeside/httemplate/misc/phone_avail-import.html,v
retrieving revision 1.2.8.2
retrieving revision 1.2.8.3
diff -u -w -d -r1.2.8.2 -r1.2.8.3
--- phone_avail-import.html	18 Jan 2011 02:46:36 -0000	1.2.8.2
+++ phone_avail-import.html	13 Feb 2011 07:19:52 -0000	1.2.8.3
@@ -7,7 +7,7 @@
               'name'      => 'PhonenumImportForm',
               'action'    => 'process/phone_avail-import.html',
               'num_files' => 1,
-              'fields'    => [ 'format', 'availbatch', 'exportnum', 'countrycode' ],
+              'fields'    => [ 'format', 'availbatch', 'exportnum', 'countrycode', 'ordernum' ],
               'message'   => 'DID import successful',
               'url'       => $p."search/phone_avail.html?availbatch=$availbatch",
           )
@@ -15,10 +15,22 @@
 
 <% &ntable("#cccccc", 2) %>
 
-  <INPUT TYPE="hidden" NAME="format" VALUE="default">
 
   <INPUT TYPE="hidden" NAME="availbatch" VALUE="<% $availbatch %>">
 
+% if ( $ordernum ) {
+    <TR>
+	<TD ALIGN="RIGHT">Bulk DID Order #</TD>
+	<TD><% $ordernum %>
+	    <INPUT TYPE="hidden" NAME="ordernum" VALUE="<% $ordernum %>">
+	</TD>
+    </TR>
+% } 
+  <TR>
+    <TD ALIGN="RIGHT">Import Format</TD>
+    <TD><% $format %><INPUT TYPE="hidden" NAME="format" VALUE="<% $format %>"></TD>
+  </TR>
+
   <% include( '/elements/tr-select-table.html',
                 'table'       => 'part_export',
                 'name_col'    => 'label',
@@ -65,15 +77,18 @@
 Uploaded files can be CSV (comma-separated value) files or Excel spreadsheets.  The file should have a .CSV or .XLS extension.
 <BR><BR>
 
-<b>Default</b> format has the following field order: <i>state, number, name</i>
+<b>Default</b> format has the following field order: <i>state, number, name</i><br>
+<b>Bulk</b> format has the following field order: <i>state, number, rate center, rate_center_abbrev</i>
 <BR><BR>
-
 Field information:
 <ul>
   <li><i>state</i>: Two-letter state code, i.e. "CA"
   <li><i>number</i>: Phone number
   <li><i>name</i>: optional, rate center
+  <li><i>rate center</i>: rate center (required)
+  <li><i>rate_center_abbrev</i>: rate center abbreviation
 </ul>
+<BR><BR>
 
 <% include('/elements/footer.html') %>
 
@@ -84,6 +99,15 @@
 
 my $conf = new FS::Conf;
 
+my $ordernum = $cgi->param('ordernum');
+$ordernum = '' unless $ordernum =~ /^\d+$/;
+
+die 'invalid ordernum' 
+    unless (!$ordernum || qsearchs('did_order', { 'ordernum' => $ordernum }));
+
+my $format = 'default';
+$format = 'bulk' if $ordernum;
+
 my $availbatch =
   time2str('webimport-%Y/%m/%d-%T'. "-$$-". rand() * 2**32, time);
 



More information about the freeside-commits mailing list