X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=httemplate%2Fsearch%2Fcust_bill.html;h=fe2f6e5f8c89dc1412c3b757abfe70a605781d93;hb=df52f854e367f6342e480c22cb6ec7b8244fd334;hp=b7eac57ea7bc3e712c027d4fcac76918b1008e4a;hpb=5ca43cb4aea0d1bd7c8c2b59bde7303e344380bb;p=freeside.git diff --git a/httemplate/search/cust_bill.html b/httemplate/search/cust_bill.html index b7eac57ea..fe2f6e5f8 100755 --- a/httemplate/search/cust_bill.html +++ b/httemplate/search/cust_bill.html @@ -124,8 +124,6 @@ if ( $cgi->param('invnum') =~ /^\s*(FS-)?(\d+)\s*$/ ) { $orderby = "ORDER BY cust_bill.$field"; } - $search{'newest_percust'} = 1 if $cgi->param('newest_percust'); - if ( $cgi->param('newest_percust') ) { $search{'newest_percust'} = 1; $count_query = "SELECT COUNT(DISTINCT cust_bill.custnum), 'N/A', 'N/A'"; @@ -146,7 +144,7 @@ if ( $cgi->param('invnum') =~ /^\s*(FS-)?(\d+)\s*$/ ) { '$%.2f outstanding balance', ]; } - $count_query .= " FROM cust_bill $join_cust_main $extra_sql"; + $count_query .= " FROM cust_bill $join_cust_main WHERE $extra_sql"; $sql_query = { 'table' => 'cust_bill',