<BR><BR>
<%
+
+my %vfields;
+
#these might belong somewhere else for other user interfaces
#pry need to eventually create stuff that's shared amount UIs
my %defs = (
foreach $svcdb (keys(%defs)) {
my $self = "FS::$svcdb"->new;
+ $vfields{$svcdb} = {};
foreach my $field ($self->virtual_fields) { # svc_Common::virtual_fields with a null svcpart returns all of them
my $pvf = $self->pvf($field);
my @list = $pvf->list;
type => 'select',
select_list => \@list };
} else {
- warn "$field";
$defs{$svcdb}->{$field} = $pvf->label;
} #endif
+ $vfields{$svcdb}->{$field} = $pvf;
+ warn "\$vfields{$svcdb}->{$field} = $pvf";
} #next $field
} #next $svcdb
-
-
+
my @dbs = $hashref->{svcdb}
? ( $hashref->{svcdb} )
: qw( svc_acct svc_domain svc_forward svc_www svc_broadband );
$html .= '<BR><BR>'. table().
table(). "<TR><TH COLSPAN=$columns>Exports</TH></TR><TR>";
foreach my $part_export ( @part_export ) {
- $html .= '<TD><INPUT TYPE="checkbox"'.
+ $html .= '<TD><INPUT TYPE="checbox"'.
' NAME="exportnum'. $part_export->exportnum. '" VALUE="1" ';
$html .= 'CHECKED'
if ( $clone || $part_svc->svcpart ) #null svcpart search causing error
qq!<INPUT TYPE="radio" NAME="${layer}__${field}_flag" VALUE="D"!.
' CHECKED'x($flag eq 'D'). ">Default ".
qq!<INPUT TYPE="radio" NAME="${layer}__${field}_flag" VALUE="F"!.
- ' CHECKED'x($flag eq 'F'). ">Fixed ".
- '<BR>';
+ ' CHECKED'x($flag eq 'F'). ">Fixed ";
+ $html .= '<BR>';
}
if ( ref($def) ) {
if ( $def->{type} eq 'select' ) {
$html .=
qq!<INPUT TYPE="text" NAME="${layer}__${field}" VALUE="$value">!;
}
+
+ if($vfields{$layer}->{$field}) {
+ $html .= qq!<BR><INPUT TYPE="radio" NAME="${layer}__${field}_flag" VALUE="X"!.
+ ' CHECKED'x($flag eq 'X'). ">Excluded ";
+ }
$html .= "</TD></TR>\n";
}
$part_svc->svcpart('') if $clone; #undone