diff options
author | levinse <levinse> | 2011-04-06 08:24:27 +0000 |
---|---|---|
committer | levinse <levinse> | 2011-04-06 08:24:27 +0000 |
commit | 31f2e890b5b3e1b0ad29a877ff67bc641ea1fc40 (patch) | |
tree | 1cf3150f90efb5f0cf97055743ba0d22e47b3713 /FS/FS/phone_avail.pm | |
parent | 2daf4c6c460e66d67839ad48f4b050be181e109f (diff) |
bulk DID order/inventory improvements, RT11291
Diffstat (limited to 'FS/FS/phone_avail.pm')
-rw-r--r-- | FS/FS/phone_avail.pm | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/FS/FS/phone_avail.pm b/FS/FS/phone_avail.pm index 8bb6a5c..3066ac0 100644 --- a/FS/FS/phone_avail.pm +++ b/FS/FS/phone_avail.pm @@ -4,6 +4,7 @@ use strict; use vars qw( @ISA $DEBUG $me ); use FS::Record qw( qsearch qsearchs dbh ); use FS::cust_svc; +use FS::Misc::DateTime qw( parse_datetime ); @ISA = qw(FS::cust_main_Mixin FS::Record); @@ -190,9 +191,9 @@ sub process_batch_import { }; my $opt = { 'table' => 'phone_avail', - 'params' => [ 'availbatch', 'exportnum', 'countrycode', 'ordernum' ], + 'params' => [ 'availbatch', 'exportnum', 'countrycode', 'ordernum', 'vendor_order_id', 'confirmed' ], 'formats' => { 'default' => [ 'state', $numsub, 'name' ], - 'bulk' => [ 'state', $numsub, 'name', 'rate_center_abbrev' ], + 'bulk' => [ 'state', $numsub, 'name', 'rate_center_abbrev', 'msa', 'latanum' ], }, 'postinsert_callback' => sub { my $record = shift; @@ -201,6 +202,8 @@ sub process_batch_import { { 'ordernum' => $record->ordernum } ); if($did_order && !$did_order->received) { $did_order->received(time); + $did_order->confirmed(parse_datetime($record->confirmed)); + $did_order->vendor_order_id($record->vendor_order_id); $did_order->replace; } } |