From: ivan Date: Tue, 15 Mar 2011 00:46:38 +0000 (+0000) Subject: fix sales report detail links when using "Separate rated usage from recurring feeds... X-Git-Tag: freeside_2_3_0~497 X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=commitdiff_plain;h=338454f43f24ab6e97029ca9033f8d136f397924 fix sales report detail links when using "Separate rated usage from recurring feeds", RT#12019 --- 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)";