update report
This commit is contained in:
@@ -34,7 +34,7 @@ class BaseReportController < ActionController::Base
|
||||
to = params[:to]
|
||||
day_ref = Time.now.utc.getlocal
|
||||
|
||||
if params[:report_type] == "daily_sale"
|
||||
if params[:report_type] == "daily_sale" || params[:report_type] == "sale_item"
|
||||
|
||||
if from != "" && to != ""
|
||||
|
||||
@@ -86,9 +86,7 @@ class BaseReportController < ActionController::Base
|
||||
else # end daily sale report
|
||||
if period_type.to_i == 1
|
||||
|
||||
if params[:from] && params[:to]
|
||||
|
||||
if params[:from] != "" && params[:to] !=""
|
||||
if params[:from] != "" && params[:to] !=""
|
||||
|
||||
f_date = DateTime.parse(params[:from])
|
||||
t_date = DateTime.parse(params[:to])
|
||||
@@ -99,8 +97,7 @@ class BaseReportController < ActionController::Base
|
||||
else
|
||||
from = day_ref.beginning_of_day.utc
|
||||
to = day_ref.end_of_day.utc
|
||||
end
|
||||
end
|
||||
end
|
||||
else
|
||||
case period.to_i
|
||||
when PERIOD["today"]
|
||||
|
||||
Reference in New Issue
Block a user