summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--httemplate/search/cust_bill_pkg.cgi7
1 files changed, 5 insertions, 2 deletions
diff --git a/httemplate/search/cust_bill_pkg.cgi b/httemplate/search/cust_bill_pkg.cgi
index b9743049d..a87e44651 100644
--- a/httemplate/search/cust_bill_pkg.cgi
+++ b/httemplate/search/cust_bill_pkg.cgi
@@ -463,8 +463,11 @@ if ( $cgi->param('pkg_tax') ) {
} else {
- #$count_query = "SELECT COUNT(*), ";
- $count_query = "SELECT COUNT(DISTINCT billpkgnum), ";
+ if ( $use_usage ) {
+ $count_query = "SELECT COUNT(*), ";
+ } else {
+ $count_query = "SELECT COUNT(DISTINCT billpkgnum), ";
+ }
if ( $use_usage eq 'recurring' ) {
$count_query .= "SUM(setup + recur - usage)";