Class: Report::InventoryPlanningCommand
- Inherits:
-
BaseCommand
- Object
- BaseCommand
- Report::InventoryPlanningCommand
- Defined in:
- app/services/report/inventory_planning_command.rb
Overview
Service object: inventory planning command.
Instance Method Summary collapse
-
#execute ⇒ Object
Run the report with the given filters and store the result.
Instance Method Details
#execute ⇒ Object
Run the report with the given filters and store the result.
12 13 14 15 16 17 |
# File 'app/services/report/inventory_planning_command.rb', line 12 def execute @results = ViewInventoryPlan.where("item_sku not similar to 'ffx-%'") # have to add this here as it's not working in the view @results = @results.where(supplier_id: supplier_id) unless supplier_id.nil? @results = @results.where("status_#{country} = ?", status) if status != 'all' @results end |