diff --git a/app/views/reports/saleitem/index.xls.erb b/app/views/reports/saleitem/index.xls.erb
index b5f7f3ef..799ede63 100755
--- a/app/views/reports/saleitem/index.xls.erb
+++ b/app/views/reports/saleitem/index.xls.erb
@@ -24,7 +24,7 @@
<% end %>
- | |
+ <%= t("views.right_panel.header.account_name") %> |
<%= t("views.right_panel.header.menu_category") %> |
<%= t("views.right_panel.detail.code") %> |
<%= t("views.right_panel.detail.product") %> |
@@ -89,25 +89,18 @@
<% if sale.status_type == "Discount" && sale.grand_total < 0
total_item_dis += sale.grand_total*(-1)
end %>
-
<% if !acc_arr.include?(sale.account_id) %>
-
- | <%= sale.account_name %> |
- |
- <%= t("views.right_panel.detail.total_price_by") %> <%= sale.account_name %> |
-
+
<% @totalByAccount.each do |account, total| %>
<% if sale.account_id == account %>
- <%= number_with_precision(total, precision:precision.to_i,delimiter:delimiter) %>
+
<% grand_total += total %>
<% end %>
<% end %>
- |
-
<% acc_arr.push(sale.account_id) %>
<% end %>
- | |
+ <%= sale.account_name %> |
<%= sale.menu_category_name %> |
<%= sale.item_code rescue '-' %> |
<%= sale.product_name rescue '-' %> |