print_labels.pdf.erb 861 B

12345678910111213141516171819202122232425262728293031
  1. <style>
  2. .column {
  3. float: left;
  4. }
  5. .left {
  6. width: 70%;
  7. font-size: 10px;
  8. min-height:5px;
  9. }
  10. .right {
  11. width: 30%;
  12. font-size: 12px;
  13. font-weight: bold;
  14. }
  15. </style>
  16. <div class='pdf-body'>
  17. <% @products.each do |obj| %>
  18. <% (1..obj['print']).each do |i| %>
  19. <div class="text-center"><%= wicked_pdf_barcode_image("#{obj['product'].barcode}.png", options = { width: 150, height: 50 }) %></div>
  20. <p style="margin:0px"><%= obj['product'].name %></p>
  21. <div class="row">
  22. <div class="column left"><%= obj['product'].display_attributes %></div>
  23. <div class="column right"><%= number_to_currency(obj['price'], precision: 2) %></div>
  24. </div>
  25. <br>
  26. <br>
  27. <% end %>
  28. <% end %>
  29. </div>