|
@@ -14,30 +14,39 @@
|
|
|
font-size: 14px;
|
|
font-size: 14px;
|
|
|
font-weight: bold;
|
|
font-weight: bold;
|
|
|
}
|
|
}
|
|
|
|
|
+
|
|
|
|
|
+ .page_break {
|
|
|
|
|
+ page-break-after: always;
|
|
|
|
|
+ }
|
|
|
|
|
+ .page_break:last-child {
|
|
|
|
|
+ page-break-after: initial;
|
|
|
|
|
+ }
|
|
|
</style>
|
|
</style>
|
|
|
<div class='pdf-body'>
|
|
<div class='pdf-body'>
|
|
|
<% @products.each do |obj| %>
|
|
<% @products.each do |obj| %>
|
|
|
<% (1..obj['print']).each do |i| %>
|
|
<% (1..obj['print']).each do |i| %>
|
|
|
- <div class="text-center" style="padding-top:5px;margin-bottom:5px">
|
|
|
|
|
- <%= wicked_pdf_barcode_image("#{obj['product'].barcode}.png", options = { width: 150, height: 50 }) %>
|
|
|
|
|
- </div>
|
|
|
|
|
-
|
|
|
|
|
- <p style="margin-left:0px;margin-right:0px;margin-top:0px;margin-bottom:10px"><%= obj['product'].name %></p>
|
|
|
|
|
-
|
|
|
|
|
- <div class="row">
|
|
|
|
|
- <div class="column left">
|
|
|
|
|
- <ul style="list-style: none; margin:0px; padding:0px">
|
|
|
|
|
- <% obj['product'].attrs_array.each do |attribute| %>
|
|
|
|
|
- <li><%= attribute %></li>
|
|
|
|
|
- <% end %>
|
|
|
|
|
- </ul>
|
|
|
|
|
|
|
+ <div class="page_break">
|
|
|
|
|
+ <p style="margin: 0px 0px 5px 0px; padding-top:10px">
|
|
|
|
|
+ <%= obj['product'].name %>
|
|
|
|
|
+ </p>
|
|
|
|
|
+ <div class="text-center" style="margin-top:0px;padding-top:0px;">
|
|
|
|
|
+ <%= wicked_pdf_barcode_image("#{obj['product'].barcode}.png", options = { width: 150, height: 50 }) %>
|
|
|
</div>
|
|
</div>
|
|
|
- <div class="column right">
|
|
|
|
|
- <span style="margin:auto"><%= number_to_currency(obj['price'], precision: 2) %></span>
|
|
|
|
|
|
|
+ <div class="row" style="padding-bottom:20px">
|
|
|
|
|
+ <div class="column left">
|
|
|
|
|
+ <ul style="list-style: none; margin:0px; padding:0px">
|
|
|
|
|
+ <% obj['product'].attrs_array.each do |attribute| %>
|
|
|
|
|
+ <li><%= attribute %></li>
|
|
|
|
|
+ <% end %>
|
|
|
|
|
+ </ul>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <div class="column right">
|
|
|
|
|
+ <span style="margin:auto"><%= number_to_currency(obj['price'], precision: 2) %></span>
|
|
|
|
|
+ </div>
|
|
|
</div>
|
|
</div>
|
|
|
|
|
+ <br>
|
|
|
|
|
+ <br>
|
|
|
</div>
|
|
</div>
|
|
|
- <br>
|
|
|
|
|
- <br>
|
|
|
|
|
<% end %>
|
|
<% end %>
|
|
|
<% end %>
|
|
<% end %>
|
|
|
</div>
|
|
</div>
|