From afc02cadca8e8033285bb213bcde620cb8fa4f99 Mon Sep 17 00:00:00 2001 From: ivan Date: Tue, 15 Mar 2011 00:46:39 +0000 Subject: [PATCH] fix sales report detail links when using "Separate rated usage from recurring feeds", RT#12019 --- httemplate/search/cust_bill_pkg.cgi | 7 +++++-- 1 file 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)"; -- 2.11.0