<% my %search; if ( $cgi->param('showdisabled') ) { %search = (); } else { %search = ( 'disabled' => '' ); } my @part_svc = qsearch('part_svc', \%search ); my $total = scalar(@part_svc); %> <%= header('Service Definition Listing', menubar( 'Main Menu' => $p) ) %> Services are items you offer to your customers.

<%= $total %> services <%= $cgi->param('showdisabled') ? do { $cgi->param('showdisabled', 0); '( hide disabled services )'; } : do { $cgi->param('showdisabled', 1); '( show disabled services )'; } %> <%= table() %> param('showdisabled') ? 2 : 3 %>>Service Table Field Modifier <% foreach my $part_svc ( sort { $a->getfield('svcpart') <=> $b->getfield('svcpart') } @part_svc ) { my($hashref)=$part_svc->hashref; my($svcdb)=$hashref->{svcdb}; my @fields = grep { $_ ne 'svcnum' && $part_svc->part_svc_column($_)->columnflag } fields($svcdb); my($rowspan)=scalar(@fields) || 1; my $url = "${p}edit/part_svc.cgi?$hashref->{svcpart}"; %> > <%= $hashref->{svcpart} %> <% unless ( $cgi->param('showdisabled') ) { %> > <%= $hashref->{disabled} ? 'DISABLED' : '' %> <% } %> > <%= $hashref->{svc} %> > <%= $hashref->{svcdb} %> <% my($n1)=''; foreach my $field ( @fields ) { my $flag = $part_svc->part_svc_column($field)->columnflag; %> <%= $n1 %><%= $field %> <% if ( $flag eq "D" ) { print "Default"; } elsif ( $flag eq "F" ) { print "Fixed"; } else { print "(Unknown!)"; } %> <%= $part_svc->part_svc_column($field)->columnvalue%> <% $n1=""; } %> <% } %> Add a new service definition