<tr id="pre_purchase_<%= pre_purchase.id %>">
  <td>
    #
    <%= hidden_field_tag 'include_tax', pre_purchase.product.include_purchase_tax %>
  </td>
  <td>
    <%= pre_purchase.product.sku %>
  </td>
  <td class="text-center">
    <img src="<%= pre_purchase.product.small_img %>" width="100" height="100"/>
  </td>
  <td>
    <%= pre_purchase.product.name %><br>
    <%= pre_purchase.product.display_attributes %>
  </td>
  <td>
    <input type="number" min="1" id="quantity_<%= pre_purchase.id %>" class="form-control" id="quantity_<%= pre_purchase.id %>" value="<%= pre_purchase.quantity %>" oninput="updateQuantity($(this))" pattern="^[0-9]*[1-9][0-9]*$" title="La cantidad debe de ser mayor o igual a 1" required>
  </td>
  <td>
    <% if pre_purchase.exchange.blank? %>
      <input class="form-control" id="price_<%= pre_purchase.id %>" type="number" min="0" value="<%= pre_purchase.product.price_base %>"  oninput="updateProductPrice($(this))" title="El precio no puede ser 0" step="any" required />   
    <% else %>
      <input class="form-control" id="price_<%= pre_purchase.id %>" type="number" min="0" value="<%= pre_purchase.product.price_base_dollars %>"  oninput="updateProductPrice($(this))" title="El precio no puede ser 0" step="any" required />  
    <% end %> 
    <span class="hidden"><%=pre_purchase.product.id%></span>
  </td>
  <td>
    <%= pre_purchase.tax %>
  </td>
  <td>
    <%= pre_purchase.total %>
  </td>
  <td class="text-center">
    <button type="button" class="btn btn-icon-only btn-danger" onclick="deleteRow($(this))"><i class="fa fa-trash-o"></i></button>
  </td>
</tr>
