=item disabled - Disabled flag, empty or `Y'
+=item preserve - Preserve after cancellation, empty or 'Y'
+
=back
=head1 METHODS
|| $new->getfield($svcdb.'__'.$_.'_label') !~ /^\s*$/ )
} (fields($svcdb),@fields)
) {
+
my $part_svc_column = $new->part_svc_column($field);
my $previous = qsearchs('part_svc_column', {
'svcpart' => $new->svcpart,
if ( uc($flag) =~ /^([A-Z])$/ || $label !~ /^\s*$/ ) {
if ( uc($flag) =~ /^([A-Z])$/ ) {
+ $part_svc_column->setfield('columnflag', $1);
my $parser = FS::part_svc->svc_table_fields($svcdb)->{$field}->{parse}
|| sub { shift };
- $part_svc_column->setfield('columnflag', $1);
$part_svc_column->setfield('columnvalue',
&$parser($new->getfield($svcdb.'__'.$field))
);
+ } else {
+ $part_svc_column->setfield('columnflag', '');
+ $part_svc_column->setfield('columnvalue', '');
}
$part_svc_column->setfield('columnlabel', $label)
|| $self->ut_text('svc')
|| $self->ut_alpha('svcdb')
|| $self->ut_enum('disabled', [ '', 'Y' ] )
+ || $self->ut_enum('preserve', [ '', 'Y' ] )
;
return $error if $error;
grep $_->can('get_dids'), $self->part_export;
}
+=item part_export_dsl_pull
+
+Returns a list of any exports (see L<FS::part_export>) for this service that
+are capable of pulling/pushing DSL orders.
+
+=cut
+
+sub part_export_dsl_pull {
+ my $self = shift;
+ grep $_->can('dsl_pull'), $self->part_export;
+}
=item cust_svc [ PKGPART ]
=item def_label - Optional description of the field in the context of service definitions
-=item type - Currently "text", "select", "disabled", or "radius_usergroup_selector"
+=item type - Currently "text", "select", "checkbox", "textarea", "disabled",
+some components specified by "select-.*.html", and a bunch more...
=item disable_default - This field should not allow a default value in service definitions
ref($param->{'svc_acct__usergroup'})
? join(',', @{$param->{'svc_acct__usergroup'}} )
: $param->{'svc_acct__usergroup'};
+
+ #unmunge cgp_accessmodes (falze laziness-ish w/edit/process/svc_acct.cgi)
+ $param->{'svc_acct__cgp_accessmodes'} ||=
+ join(' ', sort
+ grep { $_ !~ /^(flag|label)$/ }
+ map { /^svc_acct__cgp_accessmodes_([\w\/]+)$/ or die "no way"; $1; }
+ grep $param->{$_},
+ grep /^svc_acct__cgp_accessmodes_([\w\/]+)$/,
+ keys %$param
+ );
+
my $new = new FS::part_svc ( {
map {
$_ => $param->{$_};
map {
my $f = $svcdb.'__'.$_;
- if ( $param->{ $f.'_flag' } =~ /^[MA]$/ ) {
+ if ( $param->{ $f.'_flag' } =~ /^[MAH]$/ ) {
$param->{ $f } = delete( $param->{ $f.'_classnum' } );
}
if ( $param->{ $f.'_flag' } =~ /^S$/ ) {