Fixed bug with $routernum and new routers. Navigation cleanup.
[freeside.git] / httemplate / edit / part_svc.cgi
index 5fbec4f..d4bb470 100755 (executable)
@@ -154,17 +154,18 @@ my %defs = (
       my @part_export =
         map { qsearch( 'part_export', {exporttype => $_ } ) }
           keys %{FS::part_export::export_info($layer)};
-     $html .= '<BR><BR>'. table().
+      $html .= '<BR><BR>'. table().
                table(). "<TR><TH COLSPAN=$columns>Exports</TH></TR><TR>";
       foreach my $part_export ( @part_export ) {
         $html .= '<TD><INPUT TYPE="checkbox"'.
                  ' NAME="exportnum'. $part_export->exportnum. '"  VALUE="1" ';
         $html .= 'CHECKED'
-          if qsearchs( 'export_svc', {
+          if ( $clone || $part_svc->svcpart ) #null svcpart search causing error
+              && qsearchs( 'export_svc', {
                                    exportnum => $part_export->exportnum,
                                    svcpart   => $clone || $part_svc->svcpart });
-        $html .= '> '. $part_export->exporttype. ' to '. $part_export->machine.
-                 '</TD>';
+        $html .= '>'. $part_export->exportnum. ': '. $part_export->exporttype.
+                 ' to '. $part_export->machine. '</TD>';
         $count++;
         $html .= '</TR><TR>' unless $count % $columns;
       }