nothing
This commit is contained in:
@@ -56,7 +56,10 @@ class Reports::HourlySaleitemController < BaseReportController
|
||||
@shift_data = sh
|
||||
end
|
||||
end
|
||||
# @hourly_total_qty = @sale_data.group_by {|s| s.date_format }.collect{|key,qty| {"date" => key , "total_qty" => qty.sum{|d| d.qty.to_i}}}
|
||||
@hourly_total_qty = @sale_data.group_by(&:date_format).map { |k,v|{"date" => k , "total_qty" => v.count }}
|
||||
|
||||
puts @hourly_total_qty.to_json
|
||||
respond_to do |format|
|
||||
format.html
|
||||
format.xls
|
||||
|
||||
Reference in New Issue
Block a user