_pre_purchase.html.erb 1.6 KB

123456789101112131415161718192021222324252627282930313233343536
  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" 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. <% if pre_purchase.exchange.blank? %>
  21. <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 />
  22. <% else %>
  23. <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 />
  24. <% end %>
  25. <span class="hidden"><%=pre_purchase.product.id%></span>
  26. </td>
  27. <td>
  28. <%= pre_purchase.tax %>
  29. </td>
  30. <td>
  31. <%= pre_purchase.total %>
  32. </td>
  33. <td class="text-center">
  34. <button type="button" class="btn btn-icon-only btn-danger" onclick="deleteRow($(this))"><i class="fa fa-trash-o"></i></button>
  35. </td>
  36. </tr>