- 'params' => [ 'availbatch', 'exportnum', 'countrycode' ],
- 'formats' => { 'default' => [ 'state', $numsub, 'name' ], },
+ 'params' => [ 'availbatch', 'exportnum', 'countrycode', 'ordernum', 'vendor_order_id', 'confirmed' ],
+ 'formats' => { 'default' => [ 'state', $numsub, 'name' ],
+ 'bulk' => [ 'state', $numsub, 'name', 'rate_center_abbrev', $msasub, 'latanum' ],
+ },
+ 'postinsert_callback' => sub {
+ my $record = shift;
+ if($record->ordernum) {
+ my $did_order = qsearchs('did_order',
+ { '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;
+ }
+ }
+ },