<%= 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 %>
From Date : <%= params[:from] rescue '-'%> , To Date : <%= params[:to] rescue '-'%>
Shift Name = <%= @shift_from rescue '-'%> - <%= @shift_to rescue '-'%> ( <%= cashier_name rescue '-'%> )
Receipt No Sale Date Total Amount Grand Total Rounding Adj. Grand Total +
Rounding Adj.
<%= 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 %>