fixed conflit

This commit is contained in:
NyanLinHtut
2019-09-11 13:30:45 +06:30
28 changed files with 262 additions and 132 deletions

View File

@@ -59,6 +59,7 @@ class Reports::HourlySaleitemController < BaseReportController
# @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

View File

@@ -54,8 +54,7 @@ class Reports::SaleitemController < BaseReportController
@shift_data = sh
end
end
respond_to do |format|
respond_to do |format|
format.html
format.xls
end
@@ -64,7 +63,7 @@ class Reports::SaleitemController < BaseReportController
def show
from, to, report_type = get_date_range_from_params
@sale_data = Sale.get_by_shift_sale_by_item(from,to,Sale::SALE_STATUS_COMPLETED)
sale_data = @sale_data
date_arr = Array.new
@sale_data.each do |sale|
local_opening_date = sale.opening_date.nil? ? '-' : sale.opening_date.utc.getlocal.strftime("%e %b %I:%M%p")