X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=blobdiff_plain;f=httemplate%2Fsearch%2Fcust_main_credit_limit.html;h=902dbbc0a29a69a548434483a1e93c29bfe3d753;hp=b2a0c9bc41b624a7707369c2d9ec9883f1afbc98;hb=7b0bbc4117a7959b9f7b7b2cf999b8188ba34160;hpb=86d3bab91d8baadcbe33e5bbceeb607990efa1eb diff --git a/httemplate/search/cust_main_credit_limit.html b/httemplate/search/cust_main_credit_limit.html index b2a0c9bc4..902dbbc0a 100644 --- a/httemplate/search/cust_main_credit_limit.html +++ b/httemplate/search/cust_main_credit_limit.html @@ -1,11 +1,7 @@ <& elements/search.html, 'title' => 'Credit limit incidents', 'name_singular' => 'incident', - 'query' => { table => 'cust_main_credit_limit', - hashref => \%hash, - extra_sql => " AND $dates_sql ", - order_by => 'ORDER BY _date ASC', - }, + 'query' => $query, 'count_query' => "SELECT COUNT(*) FROM cust_main_credit_limit", 'header' => [ 'Date', @@ -60,4 +56,11 @@ if ( $cgi->param('custnum') =~ /^(\d+)$/ ) { $count_query .= " AND custnum = $1"; } +my $query = { + table => 'cust_main_credit_limit', + hashref => \%hash, + extra_sql => ( keys(%hash) ? ' AND ' : ' WHERE ' ). $dates_sql, + order_by => 'ORDER BY _date ASC', +}; +