<tr id="product_<%= product.id %>">
  <td>#</td>
  <td>
    <%= product.sku %>
  </td>
  <td class="text-center">
    <img src="<%= product.small_img %>" width="100" height="100"/>
  </td>
  <td>
    <%= product.name %><br>
    <%= product.display_attributes %>
  </td>
  <td>
    <input type="number" min="1" class="form-control" value="<%= object_totals['quantity'] %>" pattern="^[0-9]*[1-9][0-9]*$" title="La cantidad debe de ser mayor o igual a 1" oninput="updateQuantity($(this))" required>
  </td>
  <td>
    <%= number_to_currency(object_totals['unit_price'], precision: 2) %>
  </td>
  <td>
    <%= number_to_currency(object_totals['tax'], precision: 2) %>
  </td>
  <td>
    <%= number_to_currency(object_totals['discount'], precision: 2) %>
  </td>
  <td>
    <%= number_to_currency(object_totals['total'], precision: 2) %>
    <%= hidden_field_tag 'total', object_totals['total'] %>
  </td>
  <td>
    <button type="button" class="btn btn-icon-only btn-danger" onclick="deleteRow($(this))"><i class="fa fa-trash-o"></i></button>
    <%= link_to add_products_return_haggle_path(product_id: product.id, quantity: object_totals['quantity'], sale_id: sale.id), :remote => true, :class => "btn btn-icon-only btn-primary hagglebutton", :title=>"Agregar regate" do %>
      <i class="fa fa-tag"></i>
    <% end %>
  </td>
</tr>
