X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=httemplate%2Fsearch%2Fcust_event.html;h=bd6ba697481023a1161bf8d3aa027490470c76af;hb=576bec49a5433f1c141caa2f01d82ad239805bff;hp=503f252bdf9062ae7e11788c8cef4f89dc0169bc;hpb=033709735189caa804476fc17e9946809516fcf7;p=freeside.git diff --git a/httemplate/search/cust_event.html b/httemplate/search/cust_event.html index 503f252bd..bd6ba6974 100644 --- a/httemplate/search/cust_event.html +++ b/httemplate/search/cust_event.html @@ -175,7 +175,13 @@ $search{'ending'} = $ending; my $where = ' WHERE '. FS::cust_event->search_sql_where( \%search ); -my $join = FS::cust_event->join_sql(); +my $join = FS::cust_event->join_sql() . + 'LEFT JOIN cust_location bill_location '. + 'ON (cust_main.bill_locationnum = bill_location.locationnum) '. + 'LEFT JOIN cust_location ship_location '. + 'ON (cust_main.ship_locationnum = ship_location.locationnum)'; + # warning: does not show the true service address for package events. + # the query to do that would be painfully slow. my $sql_query = { 'table' => 'cust_event', @@ -191,6 +197,7 @@ my $sql_query = { 'extra_sql' => $where, 'order_by' => 'ORDER BY _date ASC', 'addl_from' => $join, + 'debug' => 2, }; my $count_sql = "SELECT COUNT(*) FROM cust_event $join $where";