_pre_purchase.html.erb 1.4 KB

1234567891011121314151617181920212223242526272829303132
  1. <tr id="pre_purchase_<%= pre_purchase.id %>">
  2. <td>
  3. #
  4. <%= hidden_field_tag 'include_tax', pre_purchase.product.include_purchase_tax %>
  5. </td>
  6. <td>
  7. <%= pre_purchase.product.sku %>
  8. </td>
  9. <td class="text-center">
  10. <img src="<%= pre_purchase.product.small_img %>" width="100" height="100"/>
  11. </td>
  12. <td>
  13. <%= pre_purchase.product.name %><br>
  14. <%= pre_purchase.product.display_attributes %>
  15. </td>
  16. <td>
  17. <input type="number" min="1" id="quantity_<%= pre_purchase.id %>" class="form-control input-xsmall" 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>
  18. </td>
  19. <td>
  20. <input class="form-control input-small" id="price_<%= pre_purchase.id %>" type="number" min="0" value="<%= pre_purchase.exchange.blank? ? pre_purchase.product.price_base : pre_purchase.product.price_base_dollars %>" oninput="updateProductPrice($(this))" title="El precio no puede ser 0" step="any" required />
  21. <span class="hidden"><%= pre_purchase.product.id %></span>
  22. </td>
  23. <td>
  24. <%= pre_purchase.tax %>
  25. </td>
  26. <td>
  27. <%= pre_purchase.total %>
  28. </td>
  29. <td class="text-center">
  30. <button type="button" class="btn btn-icon-only btn-danger" onclick="deleteRow($(this))"><i class="fa fa-trash-o"></i></button>
  31. </td>
  32. </tr>