_pre_transfer.html.erb 1.2 KB

123456789101112131415161718192021222324
  1. <tr id="pre_transfer_<%= pre_transfer.id %>">
  2. <td>#</td>
  3. <td class="text-center">
  4. <img src="<%= pre_transfer.product.small_img %>" width="100" height="100"/>
  5. </td>
  6. <td><%= pre_transfer.product.sku %></td>
  7. <td>
  8. <%= pre_transfer.product.name %><br>
  9. <%= pre_transfer.product.display_attributes %>
  10. </td>
  11. <td>
  12. <% if pre_transfer.origin_is_pointsale? %>
  13. <%= AvailableProduct.find_by(pointsale_id: pre_transfer.origin_id, product_id: pre_transfer.product_id).stock + pre_transfer.quantity %>
  14. <% else %>
  15. <%= WarehouseStock.find_by(warehouse_id: pre_transfer.origin_id, product_id: pre_transfer.product_id).stock + pre_transfer.quantity %>
  16. <% end %>
  17. </td>
  18. <td>
  19. <input type="number" min="1" id="quantity_<%= pre_transfer.id %>" class="form-control input-medium" id="quantity_<%= pre_transfer.id %>" value="<%= pre_transfer.quantity %>" oninput="updateQuantity($(this))" pattern="^[0-9]*[1-9][0-9]*$" title="La cantidad debe de ser mayor o igual a 1" required>
  20. </td>
  21. <td class="text-center">
  22. <button type="button" class="btn btn-icon-only btn-danger" onclick="deleteRow($(this))"><i class="fa fa-trash-o"></i></button>
  23. </td>
  24. </tr>