<div id="page-header">
  <h1>Reports: Cab Log</h1>
</div>

<%= form_for @query, :url=>url_for(:action=>:cab), :html=>{:method=>:get} do |f| %>
  <fieldset>
    <p>
      <%= f.date_select  :start_date, :discard_day=>true %>
      <%= f.submit "Report" %>
    </p>
  </fieldset>
<% end %>

<table>
<tr>
<th>Date</th>
<th>Name</th>
<th>Trip purpose</th>
<th>Pick-Up Point</th>
<th>Destination</th>
<th>Time</th>
</tr>
<% for trip in @trips %>
<tr>
<td><%= trip.pickup_time.to_date %></td>
<td><%= trip.customer.name %></td>
<td><%= trip.trip_purpose %></td>
<td><%= trip.pickup_address.text %></td>
<td><%= trip.dropoff_address.text %></td>
<td><%= trip.pickup_time.time %></td>
</tr>

<% end %>
</table>

<div id="page-header">
  <h1>Reports: Cab Log</h1>
</div>

<%= form_for @query, :url=>url_for(:action=>:cab), :html=>{:method=>:get} do |f| %>
  <fieldset>
    <p>
      <%= f.date_select  :start_date, :discard_day=>true %>
      <%= f.submit "Report" %>
    </p>
  </fieldset>
<% end %>

<table>
<tr>
<th>Date</th>
<th>Name</th>
<th>Trip purpose</th>
<th>Pick-Up Point</th>
<th>Destination</th>
<th>Time</th>
</tr>
<% for trip in @trips %>
<tr>
<td><%= trip.pickup_time.to_date %></td>
<td><%= trip.customer.name %></td>
<td><%= trip.trip_purpose %></td>
<td><%= trip.pickup_address.try(:text) || '(Unspecified Address)' %></td>
<td><%= trip.dropoff_address.try(:text) || '(Unspecified Address)' %></td>
<td><%= trip.pickup_time.time %></td>
</tr>

<% end %>
</table>

Make cab log report work with missing addresses
Make cab log report work with missing addresses
