|
|
@@ -2,22 +2,22 @@
|
|
|
#products_table {
|
|
|
border-collapse: collapse;
|
|
|
page-break-inside:auto;
|
|
|
- }
|
|
|
+ }
|
|
|
#products_table tr {
|
|
|
- page-break-inside:avoid; page-break-after:auto;
|
|
|
- }
|
|
|
+ page-break-inside:avoid; page-break-after:auto;
|
|
|
+ }
|
|
|
</style>
|
|
|
<div class='pdf-body'>
|
|
|
<header class='document-header'>
|
|
|
<h1 class='text-center'>
|
|
|
- <% if pointsale.img_pointsale.present? %>
|
|
|
- <%= wicked_pdf_image_tag_for_public(pointsale.img_pointsale(:medium), :style => "margin-top:10px") %>
|
|
|
- <% elsif @pos_config.ticket_img.present? %>
|
|
|
- <%= wicked_pdf_image_tag_for_public(@pos_config.ticket_img(:medium), :style => "margin-top:10px") %>
|
|
|
- <% end %>
|
|
|
- </h1>
|
|
|
+ <% if pointsale.img_pointsale? %>
|
|
|
+ <%= wicked_pdf_image_tag_for_public(pointsale.img_pointsale_url, :style => "margin-top:10px") %>
|
|
|
+ <% elsif @pos_config.ticket_img? %>
|
|
|
+ <%= wicked_pdf_image_tag_for_public(@pos_config.ticket_img_url, :style => "margin-top:10px") %>
|
|
|
+ <% end %>
|
|
|
+ </h1>
|
|
|
</header>
|
|
|
- <h3 class="text-center">Corte de caja <%= pointsale.name %></h3>
|
|
|
+ <h3 class="text-center">Corte de caja <%= pointsale.name %></h3>
|
|
|
|
|
|
<div class="resume" style="border-bottom:1px solid black;">
|
|
|
<h4 style="margin-top:5px;margin-bottom:5px">RESUMEN</h4>
|
|
|
@@ -30,13 +30,13 @@
|
|
|
<strong>Realizó:</strong>
|
|
|
<%= cash_out.user.first_name %><br>
|
|
|
<strong>Recibió:</strong>
|
|
|
- <%= cash_out.received_by.first_name %><br>
|
|
|
+ <%= cash_out.received_by.first_name %><br>
|
|
|
<strong>Articulos:</strong>
|
|
|
<%= cash_out.open_cash_register.products.count %>
|
|
|
<% if cash_out.observations.present? %>
|
|
|
<br> <strong>Observaciones:</strong>
|
|
|
- <%= cash_out.observations %>
|
|
|
- <% end %>
|
|
|
+ <%= cash_out.observations %>
|
|
|
+ <% end %>
|
|
|
</div>
|
|
|
|
|
|
<div style="border-bottom:1px solid black; margin-top:10px">
|
|
|
@@ -46,27 +46,27 @@
|
|
|
<th style="text-align:left">Fondo anterior</th>
|
|
|
<th style="text-align:center">Efectivo en caja</th>
|
|
|
<th style="text-align:center">Retiro</th>
|
|
|
- <th style="text-align:right">Fondo</th>
|
|
|
+ <th style="text-align:right">Fondo</th>
|
|
|
</tr>
|
|
|
</thead>
|
|
|
<tbody>
|
|
|
<tr>
|
|
|
-
|
|
|
+
|
|
|
<td style="text-align:left">
|
|
|
- <%= number_to_currency(initial_cash, precision: 2) %>
|
|
|
- </td>
|
|
|
+ <%= number_to_currency(initial_cash, precision: 2) %>
|
|
|
+ </td>
|
|
|
<td style="text-align:center">
|
|
|
- <%= number_to_currency(cash_out.physical_cash, precision: 2) %>
|
|
|
- </td>
|
|
|
+ <%= number_to_currency(cash_out.physical_cash, precision: 2) %>
|
|
|
+ </td>
|
|
|
<td style="text-align:center">
|
|
|
- <%= number_to_currency(cash_out.received_cash, precision: 2) %>
|
|
|
+ <%= number_to_currency(cash_out.received_cash, precision: 2) %>
|
|
|
</td>
|
|
|
<td style="text-align:right">
|
|
|
- <%= number_to_currency(cash_out.cash_fund, precision: 2) %>
|
|
|
- </td>
|
|
|
- </tr>
|
|
|
+ <%= number_to_currency(cash_out.cash_fund, precision: 2) %>
|
|
|
+ </td>
|
|
|
+ </tr>
|
|
|
</tbody>
|
|
|
- </table>
|
|
|
+ </table>
|
|
|
</div>
|
|
|
|
|
|
<div style="border-bottom:1px solid black; margin-top:10px">
|
|
|
@@ -83,20 +83,20 @@
|
|
|
</thead>
|
|
|
<tbody>
|
|
|
<tr>
|
|
|
- <td style="text-align:left">
|
|
|
+ <td style="text-align:left">
|
|
|
<%= number_to_currency(detail.incoming, precision: 2) %>
|
|
|
</td>
|
|
|
<td style="text-align:center">
|
|
|
<%= number_to_currency(detail.outgoing, precision: 2) %>
|
|
|
</td>
|
|
|
<td style="text-align:right">
|
|
|
- <%= number_to_currency(detail.total, precision: 2) %>
|
|
|
- </td>
|
|
|
- </tr>
|
|
|
+ <%= number_to_currency(detail.total, precision: 2) %>
|
|
|
+ </td>
|
|
|
+ </tr>
|
|
|
</tbody>
|
|
|
- </table>
|
|
|
- <% end %>
|
|
|
- </div>
|
|
|
+ </table>
|
|
|
+ <% end %>
|
|
|
+ </div>
|
|
|
<div class="products" style="border:0px">
|
|
|
<h4 style="margin-top:5px;margin-bottom:5px">SALIDA DE MERCANCÍA</h4>
|
|
|
<table cellspacing="0" id="products_table">
|
|
|
@@ -109,9 +109,9 @@
|
|
|
</thead>
|
|
|
<tbody>
|
|
|
<% @details.each_with_index do |detail, key| %>
|
|
|
- <% if @details[key -1].present?
|
|
|
+ <% if @details[key -1].present?
|
|
|
last_one_category = @details[key -1]['parent'].present? ? @details[key -1]['parent'] : @details[key -1]['category'] %>
|
|
|
- <% else
|
|
|
+ <% else
|
|
|
last_one_category = ""
|
|
|
%>
|
|
|
<% end %>
|
|
|
@@ -119,10 +119,10 @@
|
|
|
<% if last_one_category != current_category %>
|
|
|
<tr style="margin-top:3px;margin-bottom:10px">
|
|
|
<td colspan="3"> <strong> <%= current_category %> </strong> </td>
|
|
|
- </tr>
|
|
|
+ </tr>
|
|
|
<% end %>
|
|
|
<tr>
|
|
|
- <td valign="bottom">
|
|
|
+ <td valign="bottom">
|
|
|
<%= detail['quantity'] %>
|
|
|
</td>
|
|
|
<td style="text-align:center">
|
|
|
@@ -131,14 +131,14 @@
|
|
|
</td>
|
|
|
<td style="text-align:right" valign="center">
|
|
|
<strong><%= number_to_currency(detail['total'], precision: 2) %></strong>
|
|
|
- </td>
|
|
|
+ </td>
|
|
|
</tr>
|
|
|
<tr style="<%= 'border-bottom:1px solid black;font-size:10px' if detail["discount"] == 0%>">
|
|
|
<td> </td>
|
|
|
<td style="text-align:center">
|
|
|
Precio de venta unitario (<%= number_to_currency(detail["price_sale"], precision: 2) %>)
|
|
|
</td>
|
|
|
- <td style="text-align:right">
|
|
|
+ <td style="text-align:right">
|
|
|
<%= number_to_currency(detail["total_without_discount"], precision: 2) %>
|
|
|
</td>
|
|
|
</tr>
|
|
|
@@ -146,12 +146,12 @@
|
|
|
<tr style="border-bottom:1px solid black;font-size:10px">
|
|
|
<td> </td>
|
|
|
<td style="text-align:center">Descuento acumulado:</td>
|
|
|
- <td style="text-align:right">
|
|
|
+ <td style="text-align:right">
|
|
|
- <%= number_to_currency(detail["discount"], precision: 2) %>
|
|
|
</td>
|
|
|
</tr>
|
|
|
- <% end %>
|
|
|
- <% end %>
|
|
|
+ <% end %>
|
|
|
+ <% end %>
|
|
|
</tbody>
|
|
|
</table>
|
|
|
</div>
|
|
|
@@ -169,18 +169,18 @@
|
|
|
<tbody>
|
|
|
<% @expenses.each do |expense| %>
|
|
|
<tr>
|
|
|
- <td style="text-align:left">
|
|
|
+ <td style="text-align:left">
|
|
|
<strong> <%= expense.expensesconcept.name %></strong> <br>
|
|
|
- <%= expense.observations %>
|
|
|
+ <%= expense.observations %>
|
|
|
</td>
|
|
|
<td style="text-align:right">
|
|
|
<%= number_to_currency(expense.quantity, precision: 2) %>
|
|
|
- </td>
|
|
|
+ </td>
|
|
|
</tr>
|
|
|
<% end %>
|
|
|
</tbody>
|
|
|
</table>
|
|
|
- </div>
|
|
|
+ </div>
|
|
|
<% end %>
|
|
|
<div style="margin-top:5px;">
|
|
|
<span style="text-decoration:underline">Nota:</span> Los productos que se muestran en el listado de salidas de mercancía, son productos de <span style="font-style:italic;"> ventas, apartados y creditos </span> que fueron registrados durante este corte.
|