X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=blobdiff_plain;f=httemplate%2Fedit%2Fpart_svc.cgi;h=6868ffd65cb20421155fb17fbfe9c8149f99f356;hp=e033a7b0981a4507e9e3418d9193f6ef2a3ab424;hb=29da3c125643b73cb6f6219b99eadb67673e4d6d;hpb=36f038b92a2cc9c8f7bc52a2e11c00dbb7ed6ce0 diff --git a/httemplate/edit/part_svc.cgi b/httemplate/edit/part_svc.cgi index e033a7b09..6868ffd65 100755 --- a/httemplate/edit/part_svc.cgi +++ b/httemplate/edit/part_svc.cgi @@ -53,6 +53,7 @@ Services are items you offer to your customers.
  • svc_forward - mail forwarding
  • svc_www - Virtual domain website
  • svc_broadband - Broadband/High-speed Internet service +
  • svc_external - Externally-tracked service @@ -129,31 +130,33 @@ my %defs = ( 'ip_addr' => 'IP address. Leave blank for automatic assignment.', 'blocknum' => 'Address block.', }, + 'svc_external' => { + #'id' => '', + #'title' => '', + }, ); - #comment this out until it can be fixed, see bug#590 - # - #foreach my $svcdb (grep dbdef->table($_), 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; - # if (scalar @list) { - # $defs{$svcdb}->{$field} = { desc => $pvf->label, - # type => 'select', - # select_list => \@list }; - # } else { - # $defs{$svcdb}->{$field} = $pvf->label; - # } #endif - # $vfields{$svcdb}->{$field} = $pvf; - # warn "\$vfields{$svcdb}->{$field} = $pvf"; - # } #next $field - #} #next $svcdb + foreach my $svcdb (grep dbdef->table($_), 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; + if (scalar @list) { + $defs{$svcdb}->{$field} = { desc => $pvf->label, + type => 'select', + select_list => \@list }; + } else { + $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 ); + : qw( svc_acct svc_domain svc_forward svc_www svc_broadband svc_external ); tie my %svcdb, 'Tie::IxHash', map { $_=>$_ } grep dbdef->table($_), @dbs; my $widget = new HTML::Widgets::SelectLayers( @@ -176,7 +179,7 @@ my %defs = ( $html .= '

    '. table(). table(). "Exports"; foreach my $part_export ( @part_export ) { - $html .= 'svcpart ) #null svcpart search causing error