From e356f2ebb6564fe8d5333fc89bb4583ee3cd1fb1 Mon Sep 17 00:00:00 2001 From: levinse Date: Sun, 13 Feb 2011 07:22:32 +0000 Subject: bulk DID orders and inventory, RT11291 --- httemplate/misc/phone_avail-import.html | 32 ++++++++++++++++++++++++++++---- 1 file changed, 28 insertions(+), 4 deletions(-) (limited to 'httemplate/misc') diff --git a/httemplate/misc/phone_avail-import.html b/httemplate/misc/phone_avail-import.html index c664c0726..fcbfcc398 100644 --- a/httemplate/misc/phone_avail-import.html +++ b/httemplate/misc/phone_avail-import.html @@ -7,7 +7,7 @@ Import a file containing phone numbers (DIDs). '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 @@ Import a file containing phone numbers (DIDs). <% &ntable("#cccccc", 2) %> - +% if ( $ordernum ) { + + Bulk DID Order # + <% $ordernum %> + + + +% } + + Import Format + <% $format %> + + <% include( '/elements/tr-select-table.html', 'table' => 'part_export', 'name_col' => 'label', @@ -65,15 +77,18 @@ Import a file containing phone numbers (DIDs). Uploaded files can be CSV (comma-separated value) files or Excel spreadsheets. The file should have a .CSV or .XLS extension.

-Default format has the following field order: state, number, name +Default format has the following field order: state, number, name
+Bulk format has the following field order: state, number, rate center, rate_center_abbrev

- Field information: +

<% include('/elements/footer.html') %> @@ -84,6 +99,15 @@ die "access denied" 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); -- cgit v1.2.1