+
+ my $export_info = FS::part_export::export_info();
+
+ my @child_objects =
+ map FS::svc_export_machine->new({
+ 'svcnum' => $svcnum,
+ 'exportnum' => $_->exportnum,
+ 'machinenum' => scalar($cgi->param('exportnum'.$_->exportnum.'machinenum')),
+ }),
+ grep { $_->machine eq '_SVC_MACHINE' }
+ $part_svc->part_export;
+
+ if ( $part_svc->has_router ) {
+ my $router = FS::router->new({
+ map { $_ => $cgi->param("router_$_") }
+ qw( routernum routername blocknum )
+ });
+ if (length($router->routername) == 0) {
+ #sensible default
+ $router->set('routername', $new->label);
+ }
+ if (length($router->blocknum) == 0) {
+ #unset it
+ $router->set('blocknum', 0);
+ }
+ push @child_objects, $router;
+ }
+
+