_pre_sale.html.erb 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. <tr id="pre_sale_<%= pre_sale.id %>">
  2. <td>
  3. #
  4. <%= hidden_field_tag 'include_tax', pre_sale.product.include_sale_tax %>
  5. </td>
  6. <td>
  7. <%= pre_sale.product.sku %>
  8. </td>
  9. <td class="text-center">
  10. <img src="<%= pre_sale.product.small_img %>" width="100" height="100"/>
  11. </td>
  12. <td>
  13. <%= pre_sale.product.name %><br>
  14. <%= pre_sale.product.display_attributes %>
  15. </td>
  16. <td>
  17. <input type="number" min="1" id="quantity_<%= pre_sale.id %>" class="form-control" id="quantity_<%= pre_sale.id %>" oninput="calculatePrice($(this))" value="<%= pre_sale.quantity %>" pattern="^[0-9]*[1-9][0-9]*$" title="La cantidad debe de ser mayor o igual a 1" required>
  18. </td>
  19. <td>
  20. <%= pre_sale.unit_price %>
  21. </td>
  22. <td>
  23. <%= pre_sale.tax %>
  24. </td>
  25. <td>
  26. <%= pre_sale.discount %>
  27. </td>
  28. <td>
  29. <%= pre_sale.total %>
  30. </td>
  31. <td style="width:5%">
  32. <% if pre_sale.haggle == 0 %>
  33. <%= link_to add_sale_haggle_path(pre_sale), :remote => true, :class => "btn btn-icon-only btn-primary hagglebutton", :title=>"Agregar regate" do %>
  34. <i class="fa fa-tag"></i>
  35. <% end %>
  36. <% end %>
  37. <button type="button" class="btn btn-icon-only btn-danger" onclick="deleteRow($(this))"><i class="fa fa-trash-o"></i></button>
  38. </td>
  39. </tr>