From d9c51bdc266798d01247e0ff72f6d64aefb91a2e Mon Sep 17 00:00:00 2001 From: ivan Date: Mon, 3 Nov 2003 05:57:28 +0000 Subject: [PATCH] add suspended/canceled browse, fix the old suspended browse --- httemplate/browse/part_pkg.cgi | 4 ++-- httemplate/index.html | 2 +- httemplate/search/cust_pkg.cgi | 10 ++-------- 3 files changed, 5 insertions(+), 11 deletions(-) diff --git a/httemplate/browse/part_pkg.cgi b/httemplate/browse/part_pkg.cgi index 9dc8860fb..efaa59e00 100755 --- a/httemplate/browse/part_pkg.cgi +++ b/httemplate/browse/part_pkg.cgi @@ -32,12 +32,12 @@ if ( $cgi->param('active') ) { $suspended_sth = dbh->prepare( 'SELECT COUNT(*) FROM cust_pkg WHERE pkgpart = ?'. ' AND ( cancel IS NULL OR cancel = 0 )'. - ' AND susp IS NOT NULL AND susp > 0' + ' AND susp IS NOT NULL AND susp != 0' ) or die dbh->errstr; $canceled_sth = dbh->prepare( 'SELECT COUNT(*) FROM cust_pkg WHERE pkgpart = ?'. - ' AND cancel IS NOT NULL AND cancel > 0' + ' AND cancel IS NOT NULL AND cancel != 0' ) or die dbh->errstr; } else { diff --git a/httemplate/index.html b/httemplate/index.html index cefbc4072..b95d2ac73 100644 --- a/httemplate/index.html +++ b/httemplate/index.html @@ -121,7 +121,7 @@ Packages diff --git a/httemplate/search/cust_pkg.cgi b/httemplate/search/cust_pkg.cgi index 1d54a53f6..3c3e17864 100755 --- a/httemplate/search/cust_pkg.cgi +++ b/httemplate/search/cust_pkg.cgi @@ -56,10 +56,10 @@ if ( $cgi->param('magic') && $cgi->param('magic') eq 'bill' ) { $qual = 'WHERE ( susp IS NULL OR susp = 0 )'. ' AND ( cancel IS NULL OR cancel = 0)'; } elsif ( $cgi->param('magic') eq 'suspended' ) { - $qual = 'WHERE susp IS NOT NULL AND susp > 0'. + $qual = 'WHERE susp IS NOT NULL AND susp != 0'. ' AND ( cancel IS NULL OR cancel = 0)'; } elsif ( $cgi->param('magic') eq 'canceled' ) { - $qual = 'WHERE cancel IS NOT NULL AND cancel > 0'; + $qual = 'WHERE cancel IS NOT NULL AND cancel != 0'; } else { die "guru meditation #420"; } @@ -74,12 +74,6 @@ if ( $cgi->param('magic') && $cgi->param('magic') eq 'bill' ) { $sortby=\*pkgnum_sort; - } elsif ( $query eq 'SUSP_pkgnum' ) { - - $sortby=\*pkgnum_sort; - - $qual = 'WHERE susp IS NOT NULL AND susp != 0'; - } elsif ( $query eq 'APKG_pkgnum' ) { $sortby=\*pkgnum_sort; -- 2.11.0