<%= l(sale.created_at, :format => '%d/%m/%y %I:%M %p') %> | <%= sale.sale_code %> | <%= sale.seller.name %>
<% if sale.credit_note.present? %>
VENTA A CRÉDITO / VALE
Folio vale: <%= sale.credit_note %>
<% else %>
VENTA A CRÉDITO
<% end %>
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.created_at + sale.customer.time_limit.days, :format => '%d/%m/%y') %>
|
|
|
| Adeudo anterior |
$ |
<%= number_to_currency(debt - sale.total, precision: 2, :unit => "") %>
|
| Adeudo actual |
$ |
<%= number_to_currency(debt, precision: 2, :unit => "") %>
|
<% if sale.get_pointsale.ticket_footer.blank? %>
<%= simple_format(@pos_config.ticket_footer) %>
<% else %>
<%= simple_format(sale.get_pointsale.ticket_footer) %>
<% end %>