diff --git a/lib/reporting/reports/enterprise_fee_summary/parameters.rb b/lib/reporting/reports/enterprise_fee_summary/parameters.rb index 5163625b7b..de74521af0 100644 --- a/lib/reporting/reports/enterprise_fee_summary/parameters.rb +++ b/lib/reporting/reports/enterprise_fee_summary/parameters.rb @@ -6,8 +6,9 @@ module Reporting class Parameters < Reporting::Reports::EnterpriseFeeSummary::Reports::Parameters::Base include ActiveModel::Validations - attr_accessor :completed_at_gt, :completed_at_lt, :distributor_ids, :producer_ids, :order_cycle_ids, - :enterprise_fee_ids, :shipping_method_ids, :payment_method_ids + attr_accessor :completed_at_gt, :completed_at_lt, :distributor_ids, + :producer_ids, :order_cycle_ids, :enterprise_fee_ids, + :shipping_method_ids, :payment_method_ids before_validation :cleanup_arrays diff --git a/lib/reporting/reports/enterprise_fee_summary/scope.rb b/lib/reporting/reports/enterprise_fee_summary/scope.rb index 0b5cfa8944..651ecbb035 100644 --- a/lib/reporting/reports/enterprise_fee_summary/scope.rb +++ b/lib/reporting/reports/enterprise_fee_summary/scope.rb @@ -317,7 +317,8 @@ module Reporting def filter_by_date(params) filter_scope("spree_orders.completed_at >= ?", params.completed_at_gt) \ if params.completed_at_gt.present? - filter_scope("spree_orders.completed_at <= ?", params.completed_at_lt) if params.completed_at_lt.present? + filter_scope("spree_orders.completed_at <= ?", params.completed_at_lt) \ + if params.completed_at_lt.present? end def filter_by_distribution(params)