X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=httemplate%2Fsearch%2Fcust_bill_event.cgi;h=9fb533a5f1a3fe11997184d7150c3e9a347a95ed;hb=e55892bdf6dc95710a19876087690a9664421215;hp=16c9acdc7bc0cf483a02ee7417b4ee00932b40bb;hpb=cf49d3c860a2000cfc23a0e0db472a7d6fc58935;p=freeside.git diff --git a/httemplate/search/cust_bill_event.cgi b/httemplate/search/cust_bill_event.cgi index 16c9acdc7..9fb533a5f 100644 --- a/httemplate/search/cust_bill_event.cgi +++ b/httemplate/search/cust_bill_event.cgi @@ -1,4 +1,4 @@ -<% include( 'elements/search.html', +<& elements/search.html, 'title' => $title, 'html_init' => $html_init, 'menubar' => $menubar, @@ -60,8 +60,8 @@ '', FS::UI::Web::cust_styles(), ], - ) -%> + +&> <%init> my $curuser = $FS::CurrentUser::CurrentUser; @@ -100,7 +100,7 @@ my $where = 'WHERE '. FS::cust_bill_event->search_sql_where( \%search ); my $join = 'LEFT JOIN part_bill_event USING ( eventpart ) '. 'LEFT JOIN cust_bill USING ( invnum ) '. - 'LEFT JOIN cust_main USING ( custnum ) '; + FS::UI::Web::join_cust_main('cust_bill'); my $sql_query = { 'table' => 'cust_bill_event', @@ -113,7 +113,8 @@ my $sql_query = { FS::UI::Web::cust_sql_fields(), ), 'hashref' => {}, - 'extra_sql' => "$where ORDER BY _date ASC", + 'extra_sql' => $where, + 'order_by' => 'ORDER BY _date ASC', 'addl_from' => $join, };