X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=blobdiff_plain;f=httemplate%2Fmisc%2Fphone_avail-import.html;h=903c17bd93750501b398efec4df834fc9c47cd8e;hp=fcbfcc3987201d7da526063183c601ba216420e7;hb=31f2e890b5b3e1b0ad29a877ff67bc641ea1fc40;hpb=2daf4c6c460e66d67839ad48f4b050be181e109f
diff --git a/httemplate/misc/phone_avail-import.html b/httemplate/misc/phone_avail-import.html
index fcbfcc398..903c17bd9 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', 'ordernum' ],
+ 'fields' => [ 'format', 'availbatch', 'exportnum', 'countrycode', 'ordernum', 'confirmed', 'vendor_order_id' ],
'message' => 'DID import successful',
'url' => $p."search/phone_avail.html?availbatch=$availbatch",
)
@@ -25,6 +25,20 @@ Import a file containing phone numbers (DIDs).
+
+ Vendor Order #
+
+
+
+
+
+ <% include( '/elements/tr-input-date-field.html', {
+ 'name' => 'confirmed',
+ 'label' => 'Order Confirmed',
+ 'value' => $confirmed,
+ })
+ %>
+
% }
Import Format
@@ -78,7 +92,7 @@ Uploaded files can be CSV (comma-separated value) files or Excel spreadsheets.
Default format has the following field order: state, number, name
-Bulk format has the following field order: state, number, rate center, rate_center_abbrev
+Bulk format has the following field order: state, number, rate center, rate_center_abbrev, msa, latanum
Field information:
@@ -87,6 +101,8 @@ Field information:
name : optional, rate center
rate center : rate center (required)
rate_center_abbrev : rate center abbreviation
+ msa : MSA
+ latanum : LATA #
@@ -102,11 +118,23 @@ 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 $vendor_order_id = '';
+my $confirmed = '';
+
+my $order = '';
+$order = qsearchs('did_order', { 'ordernum' => $ordernum } )
+ if $ordernum;
+
+die 'invalid ordernum' unless (!$ordernum || $order);
my $format = 'default';
-$format = 'bulk' if $ordernum;
+
+if ( $order ) {
+ $format = 'bulk';
+ $confirmed = $order->confirmed;
+ $vendor_order_id = $order->vendor_order_id;
+}
+
my $availbatch =
time2str('webimport-%Y/%m/%d-%T'. "-$$-". rand() * 2**32, time);