missing preliminary msgcat.html, RT#12515
[freeside.git] / httemplate / browse / part_svc.cgi
index 94afdef..4549e44 100755 (executable)
@@ -129,7 +129,16 @@ function part_export_areyousure(href) {
 %
 
         <TR>
-          <TD><A HREF="<% $p %>edit/part_export.cgi?<% $part_export->exportnum %>"><% $part_export->exportnum %>:&nbsp;<% $part_export->exporttype %>&nbsp;to&nbsp;<% $part_export->machine %></A></TD>
+          <TD><A HREF="<% $p %>edit/part_export.cgi?<% $part_export->exportnum %>">
+<% $part_export->exportnum %>:&nbsp;
+% if ($part_export->exportname) {
+<B><% $part_export->exportname %></B> (
+% }
+<% $part_export->exporttype %>&nbsp;to&nbsp;<% $part_export->machine %>
+% if ($part_export->exportname) {
+)
+% }
+</A></TD>
        </TR>
 %  } 
 
@@ -160,14 +169,14 @@ function part_export_areyousure(href) {
 
      <TD CLASS="grid" BGCOLOR="<% $bgcolor %>">
 % my $value = &$formatter($part_svc->part_svc_column($field)->columnvalue);
-%          if ( $flag =~ /^[MA]$/ ) { 
-%            $inventory_class{$value}
-%              ||= qsearchs('inventory_class', { 'classnum' => $value } );
-%       
-
-            <% $inventory_class{$value}
-                  ? $inventory_class{$value}->classname
-                  : "WARNING: inventory_class.classnum $value not found" %>
+% if ( $flag =~ /^[MAH]$/ ) { 
+%   my $select_table = ($flag eq 'H') ? 'hardware_class' : 'inventory_class';
+%   $select_class{$value} ||= 
+%       qsearchs($select_table, { 'classnum' => $value } );
+% 
+            <% $select_class{$value}
+                  ? $select_class{$value}->classname
+                  : "WARNING: $select_table.classnum $value not found" %>
 % } else { 
 
             <% $value %>
@@ -199,6 +208,7 @@ my %flag = (
   'M' => 'Manual selected from inventory',
   #'A' => 'Automatically fill in from inventory',
   'A' => 'Automatically filled in from inventory',
+  'H' => 'Selected from hardware class',
   'X' => 'Excluded',
 );
 
@@ -223,6 +233,6 @@ if ( $cgi->param('orderby') eq 'active' ) {
   @part_svc = sort { lc($a->svc) cmp lc($b->svc) } @part_svc;
 }
 
-my %inventory_class = ();
+my %select_class = ();
 
 </%init>