X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=httemplate%2Fbrowse%2Fpart_pkg.cgi;h=a5e212d17923fe7cb17a06bd0cf1ecd42aa61a87;hb=7aae40398f1c8ed42424f1694640c9796a580d22;hp=0afa54750f89cc29a2edb8886790157b2ff710e3;hpb=1a033848671cad2cbe7687b37fc718b3b2a68b83;p=freeside.git
diff --git a/httemplate/browse/part_pkg.cgi b/httemplate/browse/part_pkg.cgi
index 0afa54750..a5e212d17 100755
--- a/httemplate/browse/part_pkg.cgi
+++ b/httemplate/browse/part_pkg.cgi
@@ -1,5 +1,6 @@
<%
+#false laziness w/access_user.html
my %search = ();
my $search = '';
unless ( $cgi->param('showdisabled') ) {
@@ -11,8 +12,8 @@ my $select = '*';
my $orderby = 'pkgpart';
if ( $cgi->param('active') ) {
- $orderby = 'num_active';
-
+ $orderby = 'num_active DESC';
+}
$select = "
*,
@@ -33,13 +34,13 @@ if ( $cgi->param('active') ) {
";
-}
+#}
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
@@ -47,17 +48,20 @@ unless ( $cgi->param('active') ) {
Add a new package definition
!;
-}
+#}
my $posttotal;
if ( $cgi->param('showdisabled') ) {
$cgi->param('showdisabled', 0);
$posttotal = '( hide disabled packages )';
+ $cgi->param('showdisabled', 1);
} else {
$cgi->param('showdisabled', 1);
$posttotal = '( show disabled packages )';
+ $cgi->param('showdisabled', 0);
}
+
# ------
my $link = [ $p.'edit/part_pkg.cgi?', 'pkgpart' ];
@@ -68,7 +72,9 @@ my $align = 'rll';
my @links = ( $link, $link, '' );
my @style = ( '', '', '' );
-unless ( $cgi->param('showdisabled') ) { #its been reversed already
+#false laziness w/access_user.html
+#unless ( $cgi->param('showdisabled') ) { #its been reversed already
+if ( $cgi->param('showdisabled') ) { #its been reversed already
push @header, 'Status';
push @fields, sub { shift->disabled
? 'DISABLED'
@@ -85,7 +91,7 @@ unless ( 0 ) { #already showing only one class or something?
$align .= 'l';
}
-if ( $cgi->param('active') ) {
+#if ( $cgi->param('active') ) {
push @header, 'Customer
packages';
my %col = (
'active' => '00CC00',
@@ -117,7 +123,7 @@ if ( $cgi->param('active') ) {
} (qw( active suspended cancelled ))
]; };
$align .= 'r';
-}
+#}
push @header, 'Frequency';
push @fields, sub { shift->freq_pretty; };