<% grand_total = 0 %>
<% @sale_data.each do |result| %>
<% grand_total = grand_total.to_f + result.grand_total.to_f%>
| <%= result.receipt_no rescue '-' %> |
<%=l result.receipt_date.getlocal, :format => :short rescue '-' %> |
<%= @shift_from %> - <%= @shift_to %> |
<%= result.cashier_name rescue '-' %> |
<%= result.table_type %> - <%= result.table_name %> |
<%= number_format(result.grand_total, precision: precision, delimiter: delimiter) %> |
| |
<%= t("views.right_panel.detail.product") %> |
<%= t("views.right_panel.detail.qty") %> |
<%= t("views.right_panel.detail.unit_price") %> |
<%= t("views.right_panel.detail.total_price") %> |
<% result.sale_items.each do |item|%>
| |
<% if item.price.to_i < 0.to_i %>
<% if item.qty.to_i < 0.to_i%>
[PROMO QTY]<%= item.product_name rescue '-' %>
<% else %>
[PROMO PRICE]<%= item.product_name rescue '-' %>
<% end %>
<% else %>
<%= item.product_name rescue '-' %>
<% end %>
|
<%= item.qty rescue '-' %> |
<%= item.unit_price rescue '-' %> |
<%= item.price rescue '-' %> |
<% end %>
| |
<%survey = Survey.find_by_receipt_no(result.receipt_no)%>
<% if !survey.nil?%>
| |
|
|
No. of Guest |
<%= survey.total_customer rescue '-' %> |
|
<% end %>
<% if !result.total_amount.nil?%>
| |
|
|
<%= t("views.right_panel.detail.total") %> <%= t("views.right_panel.detail.amount") %> |
<%= result.total_amount %> |
|
<% end %>
<% if result.total_discount.to_f > 0 %>
| |
|
|
<%= t("views.right_panel.detail.total") %>
<%= t("views.right_panel.detail.discount") %>
<%= t("views.right_panel.detail.amount") %> |
- <%= result.total_discount %> |
|
<% end %>
<% if !result.total_tax.nil? %>
| |
|
|
Tax Amount |
<%= result.total_tax %> |
|
<% end %>
<% sale_payments = result.sale_payments %>
<% if sale_payments.length > 0%>
<% sale_payments.each do |rec| %>
<%if rec.payment_amount.to_f > 0 %>
| |
|
|
Payment <%= rec.payment_method.upcase %>( <%= rec.payment_status %> ) |
<%= rec.payment_amount %> |
|
<% if !rec.payment_reference.nil? %>
| |
|
|
Payment Ref. |
<%= rec.payment_reference %> |
|
<% end %>
<% end %>
<% end %>
<% if result.amount_changed != 0 && !result.amount_changed.nil? %>
| |
|
|
<%= t("views.right_panel.detail.change") %> <%= t("views.right_panel.detail.amount") %> |
<%= result.amount_changed %> |
|
<% end %>
<% if !result.customer_id.nil?%>
| |
|
|
Customer |
<%= result.customer_name rescue '-'%>
<% if result.customer_company.present? %>
(<%= result.customer_company rescue '-' %>)
<% end %>
|
|
<% end %>
| |
<% end %>
<% end %>
| |
|
|
|
Total Nett - <%= grand_total %> |
|