<% if  @product_for_return.present? %>
  var table = $('#change_for_product_table').DataTable();
  var newRow = $('<%= j render partial: "product_for_return", locals: {product: @product_for_return, sale: @sale, object_totals: @object_totals} %>');
  x = $('#change_for_product_table').dataTable();
  newRow.find('td:eq(0)').html(newRow.find('td:eq(0)').html().replace('#', x.fnGetData().length + 1));
  table.row.add(newRow).draw();
<% else %>
  toastr["error"]("Error, No se encontró el producto.");
<% end %>
