<%= render :partial=>'shift_sale_report_filter', :locals=>{ :period_type => true, :shift_name => false, :report_path =>reports_shiftsale_index_path} %>
<% if params[:from]%> <% 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 - result[:rounding_adj].to_f %> <% void += result[:void_amount].to_f %> <% cash += result[:cash_amount].to_f %> <% credit += result[:credit_amount].to_f %> <% accept_credit += result[:accept_credit_amount].to_f %> <% foc += result[:foc_amount].to_f %> <% card += result[:card_amount].to_f %> <% total += result[:grand_total].to_f %> <% rounding_adj += result[:rounding_adj].to_f %> <% g_total += grand_total.to_f %> <% end %>
From Date : <%= params[:from] rescue '-'%> ,To Date : <%= params[:to] rescue '-'%>
Cashier Station Shift Name Void Amount Cash Payment Credit Charges Credit Payment FOC Payment Card Payment Grand Total +
Rounding Adj
Rounding Adj Grand Total
<%= result[:cashier_station_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_amount].to_f.to_d rescue '-'%> <%= sprintf "%.2f",result[:credit_amount].to_f.to_d rescue '-'%> <%= sprintf "%.2f",result[:accept_credit_amount].to_f.to_d rescue '-'%> <%= sprintf "%.2f",result[:foc_amount].to_f.to_d rescue '-'%> <%= sprintf "%.2f",result[:card_amount].to_f.to_d rescue '-'%> <%= sprintf "%.2f",result[:grand_total].to_f.to_d rescue '-'%> <%= sprintf "%.2f",result[:rounding_adj].to_f.to_d rescue '-'%><%= sprintf "%.2f",grand_total.to_f.to_d rescue '-'%>
(<%= sprintf("%.2f",void) rescue '-'%>) <%= sprintf("%.2f",cash) rescue '-'%> <%= sprintf("%.2f",credit) rescue '-'%> <%= sprintf("%.2f",accept_credit) rescue '-'%> <%= sprintf("%.2f",foc) rescue '-'%> <%= sprintf("%.2f",card) rescue '-'%> <%= sprintf("%.2f",total) rescue '-'%> <%= sprintf("%.2f",rounding_adj) rescue '-'%> <%= sprintf("%.2f",g_total) rescue '-'%>