<%= render :partial=>'shift_sale_report_filter', :locals=>{ :period_type => true, :shift_name => true, :report_path =>reports_receipt_no_index_path} %>
<% if !params[:from].blank?%> <% end %> <% if @shift_from %> <% if @shift.employee %> <% cashier_name = !@shift.nil? ? @shift.employee.name : '-' %> <% end %> <% end %> <% grand_total = 0 %> <% total_tax = 0 %> <% guest_count = 0 %> <% total_sum = 0 %> <% discount_amt = 0 %> <% other_amt = 0 %> <% total_nett = 0 %> <% rounding_adj = 0%> <% gov_tax = 0 %> <% service_charge = 0 %> <% @sale_data.each do |result| %> <% grand_total = grand_total.to_f + result.grand_total.to_f %> <% total_tax += result.total_tax.to_f %> <% total_sum += result.total_amount.to_f %> <% discount_amt += result.total_discount.to_f %> <% rounding_adj += result.rounding_adjustment.to_f %> <% end %>
From Date : <%= params[:from] rescue '-' %> , To Date : <%= params[:to] rescue '-'%>
Shift Name = <%= @shift_from rescue '-'%> - <%= @shift_to rescue '-'%> ( <%= cashier_name rescue '-'%> )
Recipt No Cashier Name Total Amount Discount Amount Tax Amount Grand Total Rounding Adj. Grand Total +
Rounding Adj.
<%= result.receipt_no rescue '-' %> <%= result.cashier_name rescue '-' %> <%= result.total_amount rescue '-' %> <%= result.total_discount rescue '-' %> <%= sprintf "%.2f",result.total_tax rescue '-' %> <%= result.grand_total %> <%= result.rounding_adjustment.to_f rescue '-' %> <%= result.grand_total_after_rounding() rescue '-'%>
  <%= total_sum rescue '-'%> <%= discount_amt rescue '-'%> <%= sprintf "%.2f",total_tax rescue '-'%> <%= grand_total.to_f.round(2) rescue '-'%> <%= rounding_adj rescue '-'%> <%= grand_total.to_f.round + rounding_adj %>
  Total Amount Discount Amount Tax Amount Grand Total Rounding Adj. Grand Total +
Rounding Adj.