Class: Crm::Reports::OrdersSoldController
- Inherits:
-
ReportsController
- Object
- ReportsController
- Crm::Reports::OrdersSoldController
- Defined in:
- app/controllers/crm/reports/orders_sold_controller.rb
Overview
Controller: orders sold.
Instance Method Summary collapse
Instance Method Details
#show ⇒ Object
6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 |
# File 'app/controllers/crm/reports/orders_sold_controller.rb', line 6 def show # input from the show page @start_date = parse_date_or_default(params[:start_date], Date.current.beginning_of_year - 1.year) @end_date = parse_date_or_default(params[:end_date], Date.current) @channel = begin Analytic::ReportGroupingDimension.where(report_grouping: params[:report_grouping]) rescue StandardError nil end @group_name = begin Analytic::ReportGroupingDimension.where(report_grouping: params[:report_grouping]).pick(:report_grouping).to_s rescue StandardError nil end end |