_pre_sale.html.erb 1.3 KB

123456789101112131415161718192021222324252627282930313233
  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 input-xsmall" 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>
  21. <%= pre_sale.amount %>
  22. </td>
  23. <td style="width:5%">
  24. <% if @pos_config.enable_haggle? && pre_sale.haggle.zero? && pre_sale.haggle_percent.zero? %>
  25. <%= link_to add_sale_haggle_path(pre_sale), :remote => true, :class => "btn btn-icon-only btn-primary hagglebutton", :title=>"Agregar regate" do %>
  26. <i class="fa fa-tag"></i>
  27. <% end %>
  28. <% else %>
  29. <%= pre_sale_haggle_type(pre_sale) %>
  30. <% end %>
  31. <button type="button" class="btn btn-icon-only btn-danger" onclick="deleteRow($(this))"><i class="fa fa-trash-o"></i></button>
  32. </td>
  33. </tr>