_pre_sale.html.erb 1.3 KB

1234567891011121314151617181920212223242526272829
  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><%= pre_sale.product.sku %></td>
  7. <td class="text-center">
  8. <img src="<%= pre_sale.product.small_img %>" width="100" height="100"/>
  9. </td>
  10. <td>
  11. <%= pre_sale.product.name %><br>
  12. <%= pre_sale.product.display_attributes %>
  13. </td>
  14. <td>
  15. <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>
  16. </td>
  17. <td><%= pre_sale.unit_price %></td>
  18. <td><%= pre_sale.tax %></td>
  19. <td><%= pre_sale.discount %></td>
  20. <td><%= pre_sale.total %></td>
  21. <td style="width:5%">
  22. <% if @pos_config.enable_haggle? && pre_sale.haggle.zero? && pre_sale.haggle_percent.zero? %>
  23. <%= link_to add_sale_haggle_path(pre_sale), :remote => true, :class => "btn btn-icon-only btn-primary hagglebutton", :title=>"Agregar regate" do %>
  24. <i class="fa fa-tag"></i>
  25. <% end %>
  26. <% end %>
  27. <button type="button" class="btn btn-icon-only btn-danger" onclick="deleteRow($(this))"><i class="fa fa-trash-o"></i></button>
  28. </td>
  29. </tr>