<TH CLASS="grid" BGCOLOR="#cccccc"><A HREF="<% do { $cgi->param('orderby', 'active'); $cgi->self_url; } %>"><FONT SIZE=-1>Customer<BR>Services</FONT></A></TH>
+ <TH CLASS="grid" BGCOLOR="#cccccc"><FONT SIZE=-1>Customer<BR>Self-service</FONT></TH>
+
<TH CLASS="grid" BGCOLOR="#cccccc">Export</TH>
<TH CLASS="grid" BGCOLOR="#cccccc">Field</TH>
<TH COLSPAN=2 CLASS="grid" BGCOLOR="#cccccc">Modifier</TH>
- </TR>
+ <TH CLASS="grid" BGCOLOR="#cccccc" STYLE="font-size: smaller;">Required</TH>
+ </TR>
+% my $conf = FS::Conf->new;
% foreach my $part_svc ( @part_svc ) {
% my $svcdb = $part_svc->svcdb;
% my $svc_x = "FS::$svcdb"->new( { svcpart => $part_svc->svcpart } );
% my @dfields = $svc_x->fields;
-% push @dfields, 'usergroup' if $svcdb eq 'svc_acct'; #kludge
+% push @dfields, 'usergroup' if $svcdb eq 'svc_acct' #double kludge
+% or ($svcdb eq 'svc_broadband'
+% and $conf->exists('svc_broadband-radius'));
% my @fields =
% grep { my $col = $part_svc->part_svc_column($_);
% my $def = FS::part_svc->svc_table_fields($svcdb)->{$_};
% $col->columnflag || ( $col->columnlabel !~ /^\S*$/
% && $col->columnlabel ne $def->{'label'}
% )
+% || ( $col->required
+% && !$def->{'required'}
+% )
% )
% }
% @dfields ;
% my $rowspan = scalar(@fields) || 1;
+% $rowspan++ if $part_svc->restrict_edit_password;
% my $url = "${p}edit/part_svc.cgi?". $part_svc->svcpart;
%
% if ( $bgcolor eq $bgcolor1 ) {
</TD>
+% tie my %selfservice_access, 'Tie::IxHash', #false laziness w/edit/part_svc.cgi
+% '' => 'Yes',
+% 'hidden' => 'Hidden',
+% 'readonly' => 'Read-only',
+% ;
+ <TD ROWSPAN=<% $rowspan %> CLASS="grid" BGCOLOR="<% $bgcolor %>" ALIGN="center">
+ <% $selfservice_access{$part_svc->selfservice_access} %></TD>
+
<TD ROWSPAN=<% $rowspan %> CLASS="inv" BGCOLOR="<% $bgcolor %>">
<TABLE CLASS="inv">
%
%
<TR>
- <TD><A HREF="<% $p %>edit/part_export.cgi?<% $part_export->exportnum %>"><% $part_export->exportnum %>: <% $part_export->exporttype %> to <% $part_export->machine %></A></TD>
+ <TD><A HREF="<% $p %>edit/part_export.cgi?<% $part_export->exportnum %>"><% $part_export->label_html %></A></TD>
</TR>
% }
</TD>
% unless ( @fields ) {
-% for ( 1..4 ) {
+% for ( 1..5 ) {
<TD CLASS="grid" BGCOLOR="<% $bgcolor %>"</TD>
% }
% }
%
% my($n1)='';
-% foreach my $field ( @fields ) {
+% foreach my $field ( sort @fields ) {
%
% #a few lines of false laziness w/edit/part_svc.cgi
% my $def = FS::part_svc->svc_table_fields($svcdb)->{$field};
<TD CLASS="grid" BGCOLOR="<% $bgcolor %>"><% $field %></TD>
<TD CLASS="grid" BGCOLOR="<% $bgcolor %>"><% $label %></TD>
<TD CLASS="grid" BGCOLOR="<% $bgcolor %>"><% $flag{$flag} %></TD>
-
<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';
+% foreach my $classnum ( split(',', $value) ) {
+% $select_class{$classnum} =
+% qsearchs($select_table, { 'classnum' => $classnum } );
+%
+ <% $select_class{$classnum}
+ ? $select_class{$classnum}->classname
+ : "WARNING: $select_table.classnum $classnum not found" %><BR>
+% }
% } else {
<% $value %>
-% }
+% }
</TD>
+ <TD CLASS="grid" BGCOLOR="<% $bgcolor %>">
+% if ($part_svc_column->required) {
+ Yes
+% }
+ </TD>
% $n1="</TR><TR>";
-% }
-%
+% } #foreach $field
+% if ( $part_svc->restrict_edit_password ) {
+ <TR>
+ <TD CLASS="grid" BGCOLOR="<% $bgcolor %>" COLSPAN=4 ALIGN="left">
+ <B><% emt('Password editing restricted.') %></B>
+ </TD>
+ </TR>
+% }
</TR>
-% }
+% } #foreach $part_svc
</TABLE>
</BODY>
'M' => 'Manual selected from inventory',
#'A' => 'Automatically fill in from inventory',
'A' => 'Automatically filled in from inventory',
+ 'H' => 'Selected from hardware class',
'X' => 'Excluded',
);
@part_svc = sort { lc($a->svc) cmp lc($b->svc) } @part_svc;
}
-my %inventory_class = ();
+my %select_class = ();
</%init>