<%
+#code duplication w/ edit/part_svc.cgi, should move this hash to part_svc.pm
my %flag = (
- 'D' => 'Default',
- 'F' => 'Fixed',
'' => '',
+ 'D' => 'Default',
+ 'F' => 'Fixed (unchangeable)',
+ #'M' => 'Manual selection from inventory',
+ 'M' => 'Manual selected from inventory',
+ #'A' => 'Automatically fill in from inventory',
+ 'A' => 'Automatically filled in from inventory',
+ 'X' => 'Excluded',
);
my %search;
@part_svc = sort { lc($a->svc) cmp lc($b->svc) } @part_svc;
}
+my %inventory_class = ();
+
%>
<%= include("/elements/header.html",'Service Definition Listing', menubar( 'Main Menu' => $p) ) %>
<%= $n1 %>
<TD><%= $field %></TD>
<TD><%= $flag{$flag} %></TD>
- <TD><%= $part_svc->part_svc_column($field)->columnvalue%></TD>
+
+ <TD>
+ <% my $value = $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" %>
+ <% } else { %>
+ <%= $value %>
+ <% } %>
+ </TD>
+
<% $n1="</TR><TR>";
}