receipt.pdf.erb 2.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  1. <div class='pdf-body'>
  2. <h3 style="margin-top:20px" class="text-center">Traspaso de <strong><%= origin %></strong> a <strong><%= destiny %></strong></h3>
  3. <div class="resume" style="border-bottom:1px solid black;">
  4. <h4 style="margin-top:5px;margin-bottom:5px">Información general</h4>
  5. <strong>Fecha:</strong>&nbsp;&nbsp;
  6. <%= l(transfer.transfer_date, :format => '%d/%m/%y') %><br>
  7. <strong>Capturó:</strong>&nbsp;&nbsp;
  8. <%= transfer.user.first_name %><br>
  9. <strong>Productos:</strong>&nbsp;&nbsp;
  10. <%= transfer.transfer_details.sum(:quantity) %><br>
  11. <strong>Status:</strong>&nbsp;&nbsp;
  12. <%= transfer_status(transfer) %>
  13. <% if transfer.received? %>
  14. <strong>Status de recepción:</strong>&nbsp;&nbsp;
  15. <%= reception_status %><br>
  16. <strong>Fecha de recepción:</strong>&nbsp;&nbsp;
  17. <%= l(transfer.reception_date, :format => '%d/%m/%y') %><br>
  18. <strong>Recibió:</strong>&nbsp;&nbsp;
  19. <%= transfer.received_by.first_name %>
  20. <% if transfer.observations.present? %>
  21. <br> <strong>Observaciones:</strong>&nbsp;&nbsp;
  22. <%= transfer.observations %>
  23. <% end %>
  24. <% end %>
  25. </div>
  26. <div class="products">
  27. <table cellspacing="0">
  28. <thead>
  29. <tr>
  30. <th style="text-align:left;font-weight:normal">Cant. Enviado</th>
  31. <th style="text-align:center;font-weight:normal">Cant. Recibido</th>
  32. <th style="text-align:right;font-weight:normal">Status recepción</th>
  33. </tr>
  34. </thead>
  35. <tbody style="border-top:1px solid black">
  36. <% transfer.transfer_details.each do |detail| %>
  37. <tr>
  38. <td colspan="3">
  39. <strong><%= truncate(detail.product.name.upcase, :length => 30, :separator => ' ', :omission => '') %> &nbsp; <%= truncate(detail.product.display_attributes_receipt.upcase, :length => 20, :separator => ' ', :omission => '') %></strong>
  40. </td>
  41. </tr>
  42. <tr>
  43. <td style="text-align:center">
  44. <%= detail.quantity.round %>
  45. </td>
  46. <td style="text-align:center">
  47. <%= detail.adjustment if transfer.received? %>
  48. </td>
  49. <td style="text-align:right">
  50. <% if detail.has_looses? %>
  51. CON PERDIDA
  52. <% elsif detail.has_surplus? %>
  53. CON EXCEDENTE
  54. <% end %>
  55. </td>
  56. </tr>
  57. <% end %>
  58. </tbody>
  59. </table>
  60. </div>
  61. </div>