INVOICE DETAILS

Receipt No: <%= @saleobj.receipt_no rescue '' %>

Date: <%= @saleobj.created_at.strftime("%d/%m/%Y - %I:%M %p") rescue '-' %>

Customer :

<% sub_total = BigDecimal("0.0") %> <% count = 0 %> <% @saleobj.sale_items.each do |sale_item| %> <% sub_total = sub_total + sale_item.price %> <% if sale_item.price > 0 %> <% count += 1 %> <% if sale_item.status != 'void' && sale_item.status != 'edit' && sale_item.status != 'foc' %> <% elsif sale_item.status == 'foc' || sale_item.status == 'void' %> <% end %> <% end end %>
# Items QTY Price Action
<%= count %> <% if sale_item.foc_item %> <%= sale_item.foc_item.product_name %> <% elsif sale_item.void_item %> <%= sale_item.void_item.product_name %> <% else %> <%= sale_item.product_name %> <% end %> <% if sale_item.discount_item %> <% if sale_item.discount_item.nett? %>
With a <%= number_format(sale_item.discount_item.discount) %> discount
<% elsif sale_item.discount_item.percentage? %>
With a <%= number_format(sale_item.discount_item.discount, precision: 0) %>% discount
<% end %> <% end %>
1
2
3
4
5
6
7
8
9
0
.
00
DEL
CLR