<tr class="hidden">
  <td colspan="4"></td>
  <td colspan="2">
    <table class="table purchase-shipments-table" data-shipment-table-for="<%= pd.id %>">
      <thead>
        <tr>
          <th>Quantity</th>
          <th>Date Received</th>
          <th></th>
        </tr>
      </thead>
      <tbody class="purchase-shipment-rows">
        <%= pd_f.fields_for :purchase_shipments do |ps_f| %>
          <%= render partial: "purchases/purchase_shipment_fields", locals: { form: ps_f, record: ps_f.object } %>
        <% end %>
      </tbody>
      <tfoot>
        <tr>
          <td class="text-left">
            Quantity remaining:
            <span class="displayed-quantity-remaining"><%= pd.quantity_remaining %></span>
          </td>
          <td class="text-right">
            <%= button_tag "Save", type: :submit, class: "btn btn-primary", title: "Save Changes" %>

            <%= link_to_add_association_fields(pd_f, :purchase_shipments) do %>
              <span class="glyphicon glyphicon-plus"></span> Add Shipment
            <% end %>
          </td>
        </tr>
      </tfoot>
    </table>
  </td>
</tr>

<tr class="hidden">
  <td colspan="3"></td>
  <td colspan="3">
    <table class="table purchase-shipments-table" data-shipment-table-for="<%= pd.id %>">
      <thead>
        <tr>
          <th>Quantity</th>
          <th>Date Received</th>
          <th></th>
        </tr>
      </thead>
      <tbody class="purchase-shipment-rows">
        <%= pd_f.fields_for :purchase_shipments do |ps_f| %>
          <%= render partial: "purchases/purchase_shipment_fields", locals: { form: ps_f, record: ps_f.object } %>
        <% end %>
      </tbody>
      <tfoot>
        <tr>
          <td class="text-left">
            Quantity remaining:
            <span class="displayed-quantity-remaining"><%= pd.quantity_remaining %></span>
          </td>
          <td class="text-right">
            <%= button_tag "Save", type: :submit, class: "btn btn-primary", title: "Save Changes" %>

            <%= link_to_add_association_fields(pd_f, :purchase_shipments) do %>
              <span class="glyphicon glyphicon-plus"></span> Add Shipment
            <% end %>
          </td>
        </tr>
      </tfoot>
    </table>
  </td>
</tr>

Expand shipments table a bit
Expand shipments table a bit
