Class: Report::InventoryPlanningCommand

Inherits:
BaseCommand
  • Object
show all
Defined in:
app/services/report/inventory_planning_command.rb

Instance Method Summary collapse

Instance Method Details

#executeObject



8
9
10
11
12
13
# File 'app/services/report/inventory_planning_command.rb', line 8

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) if supplier_id != nil
  @results = @results.where("status_#{country} = ?", status) if status != 'all'
  @results
end