<%= render :partial=>'shift_sale_report_filter', :locals=>{ :period_type => true, :shift_name => true, :report_path =>reports_void_sale_index_path} %>
<% if @sale_data.count > 0 %> <% if !params[:from].blank?%> <% end %> <% if @shift_from %> <% if @shift %> <% cashier_name = !@shift.nil? ? @shift[0].employee.name : '-' %> <% end %> <% end %> <% total_amount = 0.0 %> <% grand_total = 0.0 %> <% rounding_adjustment = 0.0 %> <% grand_rounding_adjustment = 0.0 %> <% @sale_data.each do |result| %> <% result[:items].each do |item| %> <% total_amount = total_amount.to_f + item.total_amount.to_f %> <% grand_total = grand_total.to_f + item.grand_total.to_f %> <% rounding_adjustment = rounding_adjustment.to_f + item.rounding_adjustment.to_f %> <% grand_rounding_adjustment = grand_rounding_adjustment.to_f + item.grand_total.to_f + item.rounding_adjustment.to_f %> <% end %> <% end %>
<%= t("views.right_panel.detail.from_date") %> : <%= params[:from] rescue '-'%> , <%= t("views.right_panel.detail.to_date") %> : <%= params[:to] rescue '-'%>
<%= t("views.right_panel.detail.shift_name") %> = <%= @shift_from rescue '-'%> - <%= @shift_to rescue '-'%> ( <%= cashier_name rescue '-'%> )
<%= t("views.right_panel.detail.receipt_no") %> <%= t("views.right_panel.detail.sale_date") %> <%= t("views.right_panel.detail.total") %> <%= t("views.right_panel.detail.amount") %> <%= t("views.right_panel.detail.grand_total") %> <%= t("views.right_panel.detail.rnd_adj_sh") %> <%= t("views.right_panel.detail.grand_total") %> +
<%= t("views.right_panel.detail.rnd_adj_sh") %>
<%= item.receipt_no rescue '-' %> <%= item.receipt_date.utc.getlocal.strftime("%e %b %I:%M%p") rescue '-' %> <%= item.total_amount.to_f rescue '-'%> <%= item.grand_total.to_f rescue '-'%> <%= item.rounding_adjustment.to_f rescue '-' %> <%= item.grand_total.to_f + item.rounding_adjustment.to_f rescue '-'%>
Total Void Amount : <%= total_amount rescue '-' %> <%= grand_total rescue '-' %> <%= rounding_adjustment rescue '-'%> <%= grand_rounding_adjustment rescue '-'%>
<% end %>