add suspended/canceled browse, fix the old suspended browse
authorivan <ivan>
Mon, 3 Nov 2003 05:57:28 +0000 (05:57 +0000)
committerivan <ivan>
Mon, 3 Nov 2003 05:57:28 +0000 (05:57 +0000)
httemplate/browse/part_pkg.cgi
httemplate/index.html
httemplate/search/cust_pkg.cgi

index 9dc8860..efaa59e 100755 (executable)
@@ -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 )'.
   $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 = ?'.
   ) 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 {
   ) or die dbh->errstr;
 
 } else {
index cefbc40..b95d2ac 100644 (file)
       Packages
       <UL>
         <LI><A HREF="search/cust_pkg.cgi?pkgnum">all packages (by package number)</A>
       Packages
       <UL>
         <LI><A HREF="search/cust_pkg.cgi?pkgnum">all packages (by package number)</A>
-        <LI><A HREF="search/cust_pkg.cgi?SUSP_pkgnum">suspended packages (by package number)</A>
+        <LI><A HREF="search/cust_pkg.cgi?magic=suspended">suspended packages (by package number)</A>
         <LI><A HREF="search/cust_pkg.cgi?APKG_pkgnum">packages with unconfigured services (by package number)</A>
         <LI><A HREF="search/cust_pkg.html">packages (by next bill date range)</A>
       </UL>
         <LI><A HREF="search/cust_pkg.cgi?APKG_pkgnum">packages with unconfigured services (by package number)</A>
         <LI><A HREF="search/cust_pkg.html">packages (by next bill date range)</A>
       </UL>
index 1d54a53..3c3e178 100755 (executable)
@@ -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 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' ) {
               ' 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";
     }
     } else {
       die "guru meditation #420";
     }
@@ -74,12 +74,6 @@ if ( $cgi->param('magic') && $cgi->param('magic') eq 'bill' ) {
 
     $sortby=\*pkgnum_sort;
 
 
     $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;
   } elsif ( $query eq 'APKG_pkgnum' ) {
   
     $sortby=\*pkgnum_sort;