change query in sale item report
This commit is contained in:
@@ -25,7 +25,7 @@ class Reports::SaleitemController < BaseReportController
|
||||
@sale_data.each {|acc_cate| @account_cate_count[acc_cate.account_id] += 1}
|
||||
|
||||
@menu_cate_count = Hash.new {|hash, key| hash[key] = 0}
|
||||
@sale_data.each {|cate| @menu_cate_count[cate.menu_category_id] += 1}
|
||||
@sale_data.each {|cate| @menu_cate_count[cate.account_id] += 1}
|
||||
|
||||
|
||||
@totalByAccount = Hash.new {|hash, key| hash[key] = 0}
|
||||
@@ -64,6 +64,9 @@ class Reports::SaleitemController < BaseReportController
|
||||
date_arr.push(str)
|
||||
end
|
||||
|
||||
@totalByAccount = Hash.new {|hash, key| hash[key] = 0}
|
||||
@sale_data.each {|acc| @totalByAccount[acc.account_id] += acc.grand_total}
|
||||
|
||||
out = {:status => 'ok', :message => date_arr}
|
||||
|
||||
respond_to do |format|
|
||||
|
||||
Reference in New Issue
Block a user