my $orderby = 'pkgpart';
if ( $cgi->param('active') ) {
- $orderby = 'num_active';
-
+ $orderby = 'num_active DESC';
+}
$select = "
*,
";
-}
+#}
my $conf = new FS::Conf;
my $taxclasses = $conf->exists('enable_taxclasses');
my $html_init;
-unless ( $cgi->param('active') ) {
+#unless ( $cgi->param('active') ) {
$html_init = qq!
One or more service definitions are grouped together into a package
definition and given pricing information. Customers purchase packages
<A HREF="${p}edit/part_pkg.cgi"><I>Add a new package definition</I></A>
<BR><BR>
!;
-}
+#}
my $posttotal;
if ( $cgi->param('showdisabled') ) {
$cgi->param('showdisabled', 0);
$posttotal = '( <a href="'. $cgi->self_url. '">hide disabled packages</a> )';
+ $cgi->param('showdisabled', 1);
} else {
$cgi->param('showdisabled', 1);
$posttotal = '( <a href="'. $cgi->self_url. '">show disabled packages</a> )';
+ $cgi->param('showdisabled', 0);
}
+
# ------
my $link = [ $p.'edit/part_pkg.cgi?', 'pkgpart' ];
my @links = ( $link, $link, '' );
my @style = ( '', '', '' );
-unless ( $cgi->param('showdisabled') ) { #its been reversed already
+#unless ( $cgi->param('showdisabled') ) { #its been reversed already
+if ( $cgi->param('showdisabled') ) { #its been reversed already
push @header, 'Status';
push @fields, sub { shift->disabled
? '<FONT COLOR="#FF0000">DISABLED</FONT>'
$align .= 'l';
}
-if ( $cgi->param('active') ) {
+#if ( $cgi->param('active') ) {
push @header, 'Customer<BR>packages';
my %col = (
'active' => '00CC00',
} (qw( active suspended cancelled ))
]; };
$align .= 'r';
-}
+#}
push @header, 'Frequency';
push @fields, sub { shift->freq_pretty; };