_index_for_admin.html.erb 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. <div class="row">
  2. <div class="col-md-12">
  3. <input type='hidden' name='filter' id='filter' value='<%= @filter %>' >
  4. <input type='hidden' name='current_page' id='current_page' value='<%= @current_page %>' >
  5. <table class="table table-striped table-bordered table-hover tableadvanced">
  6. <thead>
  7. <tr>
  8. <th>#</th>
  9. <th>Fecha</th>
  10. <th>Origen</th>
  11. <th>Destino</th>
  12. <th>Productos</th>
  13. <th>Status</th>
  14. <th>Status<br>recepción</th>
  15. <th>Acciones</th>
  16. </tr>
  17. </thead>
  18. <tbody>
  19. <% @transfers.each_with_index do |transfer, key| %>
  20. <tr>
  21. <td> <%= key + 1 %> </td>
  22. <td> <%= l(transfer.transfer_date, format: '%d/%B/%Y') %> </td>
  23. <td>
  24. <%= transfer.origin_is_pointsale? ? Pointsale.find(transfer.origin_id).name : Warehouse.find(transfer.origin_id).name %>
  25. </td>
  26. <td>
  27. <%= transfer.destiny_is_pointsale? ? Pointsale.find(transfer.destiny_id).name : Warehouse.find(transfer.destiny_id).name %>
  28. </td>
  29. <td> <%= transfer.transfer_details.count %> </td>
  30. <td class="text-center"><%= transfer_status(transfer) %></td>
  31. <td class="text-center"><%= transfer_details(transfer) %></td>
  32. <td class="text-center">
  33. <%= link_to transfer, { class: "btn btn-icon-only default filtros", title: "Ver traspaso" } do %>
  34. <i class="fa fa-search"></i>
  35. <% end %>
  36. <%= link_to print_transfer_receipt_path(transfer.id, format: 'pdf'), { class: "btn btn-icon-only default", target: "blank" } do %>
  37. <i class="fa fa-print"></i>
  38. <% end %>
  39. </td>
  40. </tr>
  41. <% end %>
  42. </tbody>
  43. </table>
  44. </div>
  45. </div>