<% if sale.get_pointsale.img_pointsale.present? %> <%= wicked_pdf_image_tag_for_public(sale.get_pointsale.img_pointsale_url, :style => "margin-top:10px") %> <% elsif @pos_config.ticket_img.present? %> <%= wicked_pdf_image_tag_for_public(@pos_config.ticket_img_url, :style => "margin-top:10px") %> <% end %>

<% if sale.get_pointsale.notes.blank? %> <%= simple_format(@pos_config.ticket_description, class: 'text-center') %> <% else %> <%= simple_format(sale.get_pointsale.notes, class: 'text-center') %> <% end %>

<%= l(Time.now, :format => '%d/%m/%y %I:%M %p') %>   |   <%= current_user.first_name.upcase %>
ABONO A CRÉDITO
Cliente: <%= sale.customer.nick_name %>
Saldo anterior $ <%= number_to_currency(deuda, precision: 2, :unit => "") %>
Abono a crédito $ <%= number_to_currency(new_payment, precision: 2, :unit => "") %>
Saldo actual $ <%= number_to_currency((deuda > new_payment ? (deuda - new_payment) : 0), precision: 2, :unit => "") %>
<% marginFooter = 20 %> <% if move.payment_method.isCash? %> <% marginFooter += 80 %> <% else %> <% marginFooter += 60 %> <% end %>
<%= move.payment_method.method %> <%= move.payment_method.id == 1 || move.payment_method.id == 4 ? "n° #{move.cardnumber}" : "" %>
Recibido: <%= number_to_currency(move.received, precision: 2) %>
Pagó: <%= number_to_currency(move.quantity, precision: 2) %>
Cambio: <%= number_to_currency(move.change, precision: 2) %>
Pagó: <%= number_to_currency(move.quantity, precision: 2) %>
<% if sale.get_pointsale.ticket_footer.blank? %> <%= simple_format(@pos_config.ticket_footer) %> <% else %> <%= simple_format(sale.get_pointsale.ticket_footer) %> <% end %>