<% if @shift_from %> <% if @shift_data.employee %> <% cashier_name = !@shift_data.nil? ? @shift_data.employee.name : '-' %> <% end %> <% end %> <% void = 0%> <% cash = 0%> <% credit = 0%> <% accept_credit = 0%> <% foc = 0%> <% card = 0%> <% total = 0%> <% rounding_adj = 0%> <% g_total = 0 %> <% @sale_data.each do |result|%> <% grand_total = result[:grand_total].to_f %> <% cash += result[:cash_sales].to_f %> <% credit += result[:credit_sales].to_f %> <% card += result[:other_sales].to_f %> <% foc += result[:foc_sales].to_f %> <% total += result[:grand_total].to_f %> <% g_total += grand_total.to_f %> <% end %>
<%= t("views.right_panel.detail.from_date") %> : <%= @from.utc.getlocal.strftime("%Y-%b-%d") rescue '-' %> - <%= t("views.right_panel.detail.to_date") %> : <%= @to.utc.getlocal.strftime("%Y-%b-%d") rescue '-'%>
<%= t("views.right_panel.detail.shift_name") %> = <%= @shift_from %> - <%= @shift_to %> ( <%= cashier_name %> )
<%= t("views.right_panel.detail.cashier_station") %> <%= t :cashier %> <%= t("views.right_panel.detail.shift_name") %> <%= t("views.right_panel.detail.cash_payment") %> <%= t("views.right_panel.detail.credit_payment") %> <%= t("views.btn.other_payment") %> <%= t("views.btn.foc") %> <%= t :payment %> <%= t("views.right_panel.detail.grand_total") %>
<%= result[:cashier_terminal_name] rescue '-'%> <%= result[:employee_name] rescue '-'%> <%= result[:shift_started_at].strftime("%e %b %I:%M%p") rescue '-' %> - <%= result[:shift_closed_at].strftime("%e %b %I:%M%p") rescue '-' %> <%= sprintf "%.2f",result[:cash_sales].to_f.to_d rescue '-'%> <%= sprintf "%.2f",result[:credit_sales].to_f.to_d rescue '-'%> <%= sprintf "%.2f",result[:other_sales].to_f.to_d rescue '-'%> <%= sprintf "%.2f",result[:foc_sales].to_f.to_d rescue '-'%> <%= sprintf "%.2f",result[:grand_total].to_f.to_d rescue '-'%>
<%= sprintf("%.2f",cash) rescue '-'%> <%= sprintf("%.2f",credit) rescue '-'%> <%= sprintf("%.2f",card) rescue '-'%> <%= sprintf("%.2f",foc) rescue '-'%> <%= sprintf("%.2f",g_total) rescue '-'%>