[freeside-commits] freeside/httemplate/misc phone_avail-import.html, 1.4, 1.5
Erik Levinson
levinse at wavetail.420.am
Sat Feb 12 23:19:48 PST 2011
Update of /home/cvs/cvsroot/freeside/httemplate/misc
In directory wavetail.420.am:/tmp/cvs-serv15255/httemplate/misc
Modified Files:
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.4
retrieving revision 1.5
diff -u -w -d -r1.4 -r1.5
--- phone_avail-import.html 18 Jan 2011 02:46:35 -0000 1.4
+++ phone_avail-import.html 13 Feb 2011 07:19:46 -0000 1.5
@@ -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