<%= l(sale.created_at, :format => '%d/%m/%y %I:%M %p') %> | <%= sale.sale_code %> | <%= sale.seller.name %>
APARTADO
Cliente: <%= sale.customer.nick_name %>
| Cantidad |
Precio |
Desc. |
Importe |
<% sale.sales_details.each_with_index do |detail, key| %>
|
<%= truncate(detail.product.name, :length => 30, :separator => ' ', :omission => '') %> <%= truncate(detail.product.display_attributes_receipt, :length => 20, :separator => ' ', :omission => '') %>
|
| <%= detail.quantity.round %> |
<%= number_to_currency(detail.unit_price, precision: 2) %> |
<%= number_to_currency(detail.discount, precision: 2) %> |
<%= number_to_currency(((detail.unit_price * detail.quantity) - detail.discount), precision: 2) %>
|
<% end %>
<% margin = 55 %>
|
|
|
| Subtotal |
$ |
<%= number_to_currency(sale.amount, precision: 2, :unit => "") %> |
<% if sale.discount > 0 %>
<% margin = margin += 20 %>
| Descuento |
$ |
<%= number_to_currency(sale.discount, precision: 2, :unit => "") %> |
<% end %>
<% if sale.tax > 0 %>
<% margin = margin += 20 %>
| IVA |
$ |
<%= number_to_currency(sale.tax, precision: 2, :unit => "") %> |
<% end %>
| Total |
$ |
<%= number_to_currency(sale.total, precision: 2, :unit => "") %> |
Vencimiento
<%= l(sale.expiration_date, :format => '%d/%m/%y') %>
|
|
|
| Anticipo |
$ |
<%= number_to_currency(debt, precision: 2, :unit => "") %> |
| Resta |
$ |
<%= number_to_currency(sale.reserve_debt, precision: 2, :unit => "") %> |
|
|
|
<% marginFooter = 20 %>
<% sale.cash_registers_moves.each do |move| %>
| <%= move.payment_method.method %> |
|
|
<% if move.payment_method.isCash? %>
<% marginFooter += 80 %>
| |
Recibido: |
<%= number_to_currency(move.received, precision: 2) %> |
| |
Pagó: |
<%= number_to_currency(move.quantity, precision: 2) %> |
| |
Cambio: |
<%= number_to_currency(move.change, precision: 2) %> |
<% else %>
<% marginFooter += 60 %>
| |
Pagó: |
<%= number_to_currency(move.quantity, precision: 2) %> |
| |
tarjeta nº: |
<%= move.cardnumber %> |
<% end %>
<% end %>
<% if sale.get_pointsale.ticket_footer.blank? %>
<%= simple_format(@pos_config.ticket_footer) %>
<% else %>
<%= simple_format(sale.get_pointsale.ticket_footer) %>
<% end %>