update report and inventory layout design

This commit is contained in:
Aung Myo
2017-10-25 14:03:15 +06:30
parent 0eea755acd
commit da6d85eaf5
25 changed files with 693 additions and 611 deletions

View File

@@ -2,18 +2,21 @@ class Reports::CommissionController < BaseReportController
# authorize_resource :class => false
def index
from_date = DateTime.now.beginning_of_day.utc.getlocal
to_date = DateTime.now.end_of_day.utc.getlocal
unless params[:daterange].blank?
from_date = Date.parse(params[:daterange].split(' - ')[0]).beginning_of_day.utc.getlocal
to_date = Date.parse(params[:daterange].split(' - ')[1]).end_of_day.utc.getlocal
@daterange = params[:daterange]
end
# from_date = DateTime.now.beginning_of_day.utc.getlocal
# to_date = DateTime.now.end_of_day.utc.getlocal
# unless params[:daterange].blank?
# from_date = Date.parse(params[:daterange].split(' - ')[0]).beginning_of_day.utc.getlocal
# to_date = Date.parse(params[:daterange].split(' - ')[1]).end_of_day.utc.getlocal
# @daterange = params[:daterange]
# end
from_date, to_date = get_date_range_from_params
commissioner = params[:commissioner].to_i
@com_id = commissioner
@commissioner = Commissioner.active.all
@transaction = ProductCommission.get_transaction(from_date, to_date, commissioner)
@from = from_date
@to = to_date

View File

@@ -2,13 +2,14 @@ class Reports::StockCheckController < BaseReportController
# authorize_resource :class => false
def index
from_date = DateTime.now.beginning_of_day.utc.getlocal
to_date = DateTime.now.end_of_day.utc.getlocal
unless params[:daterange].blank?
from_date = Date.parse(params[:daterange].split(' - ')[0]).beginning_of_day.utc.getlocal
to_date = Date.parse(params[:daterange].split(' - ')[1]).end_of_day.utc.getlocal
@daterange = params[:daterange]
end
# from_date = DateTime.now.beginning_of_day.utc.getlocal
# to_date = DateTime.now.end_of_day.utc.getlocal
# unless params[:daterange].blank?
# from_date = Date.parse(params[:daterange].split(' - ')[0]).beginning_of_day.utc.getlocal
# to_date = Date.parse(params[:daterange].split(' - ')[1]).end_of_day.utc.getlocal
# @daterange = params[:daterange]
# end
from_date, to_date = get_date_range_from_params
@item_code = params[:item_code]
@inventory_definitions = InventoryDefinition.active.all