_pre_transfer.html.erb 1.2 KB

12345678910111213141516171819202122232425262728
  1. <tr id="pre_transfer_<%= pre_transfer.id %>">
  2. <td>
  3. #
  4. </td>
  5. <td class="text-center">
  6. <img src="<%= pre_transfer.product.small_img %>" width="100" height="100"/>
  7. </td>
  8. <td>
  9. <%= pre_transfer.product.sku %>
  10. </td>
  11. <td>
  12. <%= pre_transfer.product.name %><br>
  13. <%= pre_transfer.product.display_attributes %>
  14. </td>
  15. <td>
  16. <% if pre_transfer.origin_is_pointsale == 1 %>
  17. <%= AvailableProduct.find_by(:pointsale_id => pre_transfer.origin_id, :product_id => pre_transfer.product_id).stock + pre_transfer.quantity %>
  18. <% else %>
  19. <%= WarehouseStock.find_by(:warehouse_id => pre_transfer.origin_id, :product_id => pre_transfer.product_id).stock + pre_transfer.quantity %>
  20. <% end %>
  21. </td>
  22. <td>
  23. <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>
  24. </td>
  25. <td class="text-center">
  26. <button type="button" class="btn btn-icon-only btn-danger" onclick="deleteRow($(this))"><i class="fa fa-trash-o"></i></button>
  27. </td>
  28. </tr>