added show controller method, purchases_detail_query and show template