simple visual fix:   for blank company column
authorivan <ivan>
Tue, 26 Mar 2002 16:24:26 +0000 (16:24 +0000)
committerivan <ivan>
Tue, 26 Mar 2002 16:24:26 +0000 (16:24 +0000)
httemplate/search/cust_main.cgi

index 7995698..03997ee 100755 (executable)
@@ -325,11 +325,14 @@ END
     } else {
       $view = $p. 'view/cust_main.cgi?'. $custnum;
     }
+    my $pcompany = $company
+      ? qq!<A HREF="$view"><FONT SIZE=-1>$company</FONT></A>!
+      : '<FONT SIZE=-1>&nbsp;</FONT>';
     print <<END;
     <TR>
       <TD ROWSPAN=$rowspan><A HREF="$view"><FONT SIZE=-1>$custnum</FONT></A></TD>
       <TD ROWSPAN=$rowspan><A HREF="$view"><FONT SIZE=-1>$last, $first</FONT></A></TD>
-      <TD ROWSPAN=$rowspan><A HREF="$view"><FONT SIZE=-1>$company</FONT></A></TD>
+      <TD ROWSPAN=$rowspan>$pcompany</TD>
 END
     if ( defined dbdef->table('cust_main')->column('ship_last') ) {
       my($ship_last,$ship_first,$ship_company)=(
@@ -337,9 +340,14 @@ END
         $cust_main->ship_last ? $cust_main->ship_first : $cust_main->first,
         $cust_main->ship_last ? $cust_main->ship_company : $cust_main->company,
       );
+    my $pship_company = $ship_company
+      ? qq!<A HREF="$view"><FONT SIZE=-1>$ship_company</FONT></A>!
+      : '<FONT SIZE=-1>&nbsp;</FONT>';
+    print <<END;
+
 print <<END;
       <TD ROWSPAN=$rowspan><A HREF="$view"><FONT SIZE=-1>$ship_last, $ship_first</FONT></A></TD>
-      <TD ROWSPAN=$rowspan><A HREF="$view"><FONT SIZE=-1>$ship_company</FONT></A></TD>
+      <TD ROWSPAN=$rowspan>$pship_company</A></TD>
 END
     }