diff options
author | levinse <levinse> | 2011-07-22 18:59:27 +0000 |
---|---|---|
committer | levinse <levinse> | 2011-07-22 18:59:27 +0000 |
commit | c405e80203f323a83b447d6fc899dbba32d52f2a (patch) | |
tree | aa7cc7ad31c43eb012ad3d9b787ee0a51bb6b4ac /FS/FS/part_svc.pm | |
parent | 99e8e2006117bd4b97ebb1daf897cc257265dc3f (diff) |
custom fields, RT11714
Diffstat (limited to 'FS/FS/part_svc.pm')
-rw-r--r-- | FS/FS/part_svc.pm | 26 |
1 files changed, 2 insertions, 24 deletions
diff --git a/FS/FS/part_svc.pm b/FS/FS/part_svc.pm index 3ae79a6df..1306d4199 100644 --- a/FS/FS/part_svc.pm +++ b/FS/FS/part_svc.pm @@ -82,12 +82,12 @@ the part_svc_column table appropriately (see L<FS::part_svc_column>). =item I<svcdb>__I<field> - Default or fixed value for I<field> in I<svcdb>. -=item I<svcdb>__I<field>_flag - defines I<svcdb>__I<field> action: null or empty (no default), `D' for default, `F' for fixed (unchangeable), `M' for manual selection from inventory, or `A' for automatic selection from inventory. For virtual fields, can also be 'X' for excluded. +=item I<svcdb>__I<field>_flag - defines I<svcdb>__I<field> action: null or empty (no default), `D' for default, `F' for fixed (unchangeable), `M' for manual selection from inventory, or `A' for automatic selection from inventory. =back If you want to add part_svc_column records for fields that do not exist as -(real or virtual) fields in the I<svcdb> table, make sure to list then in +fields in the I<svcdb> table, make sure to list then in EXTRA_FIELDS_ARRAYREF also. If EXPORTNUMS_HASHREF is specified (keys are exportnums and values are @@ -618,28 +618,6 @@ sub _svc_defs { keys %info, ; - # yuck. maybe this won't be so bad when virtual fields become real fields - my %vfields; - foreach my $svcdb (grep dbdef->table($_), keys %svc_defs ) { - eval "use FS::$svcdb;"; - 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; - if (scalar @list) { - $svc_defs{$svcdb}->{$field} = { desc => $pvf->label, - type => 'select', - select_list => \@list }; - } else { - $svc_defs{$svcdb}->{$field} = $pvf->label; - } #endif - $vfields{$svcdb}->{$field} = $pvf; - warn "\$vfields{$svcdb}->{$field} = $pvf" - if $DEBUG; - } #next $field - } #next $svcdb - $svc_defs = \%svc_defs; #cache } |