<%= t :dashboard %>

<% if @print_settings.precision.to_i > 0 precision = @print_settings.precision else precision = 0 end #check delimiter if @print_settings.delimiter delimiter = "," else delimiter = "" end %>
help
<%= t :sale_count %>
attach_money
<%= t :total_sale %>
person_add
<%= t :total_credit %>
credit_card
<%= t :total_card %>
<% if current_user.role == 'administrator' || current_user.role == 'manager' %>

dashboard<%= (t :top) + " " + (t :products) %>

<%= pie_chart @top_products %>

dashboard<%= (t :bottom) + " " + (t :products) %>

<%= pie_chart @bottom_products %>

av_timer<%= (t :hourly) + " " + (t :sale) %>

<%= column_chart @hourly_sales %>

assignment_ind<%= (t :staff) + " " + (t :sale) %>

<%= column_chart @employee_sales %>
<% if !@summ_sale.nil? %>
<%= t :sale %>
<%= t("views.right_panel.detail.total") %> <%= t("views.right_panel.detail.receipt") %> : <%= @summ_sale.total_receipt %>
<%= t("views.right_panel.detail.total") %> <%= t :sale %> : <%= number_with_precision( @summ_sale.total_amount, precision: precision.to_i ,delimiter: delimiter) %>
<%= t("views.right_panel.detail.total") %> <%= t("views.right_panel.detail.discount") %> : <%= number_with_precision( @summ_sale.total_discount, precision: precision.to_i ,delimiter: delimiter) %>
<%= t("views.right_panel.detail.total") %> <%= t("views.right_panel.detail.tax") %> : <%= number_with_precision( @summ_sale.total_tax , precision: precision.to_i ,delimiter: delimiter)%>
<%= t("views.right_panel.detail.grand_total") %> : <%= number_with_precision( @summ_sale.grand_total , precision: precision.to_i ,delimiter: delimiter)%>
<% if !(@total_payment_methods.nil?) %> <% @total_payment_methods.each do |payment| %> <% if !@sale_data[0].empty? %> <% if payment.payment_method != 'mpu' && payment.payment_method != 'visa' && payment.payment_method != 'master' && payment.payment_method != 'jcb' %> <% end %> <% end %> <% end %> <% total_card = @sale_data.select { |hash| hash["card"]!=nil }.first %> <% if !total_card.nil? %> <% end %> <% end %>
<%= payment.payment_method.to_s.capitalize %> Sale : <% @sale_data.each do |data| %> <% pay_mth = payment.payment_method %> <%= data[""+pay_mth+""] %> <% end %>
<%= t("views.right_panel.detail.card_sale") %> : <%= total_card["card"].to_f %>
<% end %>
<%= t :customer %>
<% if !@total_customer.nil? %> <% end %> <% if !@total_dinein.nil? %> <% end %> <% if !@total_takeaway.nil? %> <% end %> <% if !@total_other_customer.nil? %> <% end %> <% if !@total_membership.nil? %> <% end %>
<%= t("views.right_panel.detail.total") %> <%= t :customer %> : <%= @total_customer %>
<%= t("views.right_panel.detail.dine_in") %> : <%= @total_dinein.total_dinein_cus %>
<%= t("views.right_panel.detail.takeaway") %> : <%= @total_takeaway.total_take_cus %>
<%= t :customer %> : <%= @total_other_customer.total_cus %>
<%= t("views.right_panel.detail.membership") %> : <%= @total_membership.total_memb_cus %>
<%= t("views.right_panel.detail.order") %>
<% if !@total_order.nil? %> <% end %> <% if !@total_accounts.nil? %> <% @total_accounts.each do |account| %> <% end %> <% end %> <% if !@top_items.nil? %> <% end %> <% if !@total_foc_items.nil? %> <% end %>
<%= t("views.right_panel.detail.total") %> <%= t("views.right_panel.detail.order") %> : <%= @total_order.total_order %>
<%= account.title %> (Account) : <% @account_data.each do |data| %> <% acc = account.title %> <%= data[""+acc+""] %> <% if !data[''+acc+''].nil? %> ( <%= data[''+acc+'_amount'] %> ) <% end %> <% end %>
<%= t :top %> <%= t("views.right_panel.detail.item") %> : <%= @top_items.item_name %>
(<%= @top_items.item_total_price %>)
<%= t("views.right_panel.detail.total") %> <%= t("views.btn.foc") %> <%= t("views.right_panel.detail.item") %> : <%= @total_foc_items.to_int %>
<% end %>