= form_for @report.search, :url => spree.orders_and_fulfillment_admin_reports_path do |f|
  = render 'date_range_form', f: f

  .row
    .alpha.two.columns= label_tag nil, t(:report_hubs)
    .omega.fourteen.columns= f.collection_select(:distributor_id_in, @distributors, :id, :name, {}, {class: "select2 fullwidth", multiple: true})

  .row
    .alpha.two.columns= label_tag nil, t(:report_producers)
    .omega.fourteen.columns= select_tag(:supplier_id_in, options_from_collection_for_select(@suppliers, :id, :name, params[:supplier_id_in]), {class: "select2 fullwidth", multiple: true})

  .row
    .alpha.two.columns= label_tag nil, t(:report_customers_cycle)
    .omega.fourteen.columns
      = f.select(:order_cycle_id_in, report_order_cycle_options(@order_cycles), {selected: params[:q][:order_cycle_id_in]}, {class: "select2 fullwidth", multiple: true})

  .row
    .alpha.two.columns= label_tag nil, t(:report_type)
    .omega.fourteen.columns= select_tag(:report_type, options_for_select(@report_types, @report_type))

  .row
    = check_box_tag :csv
    = label_tag :csv, t(:report_customers_csv)

  .row
  = button t(:search)

= render "table", id: "listing_orders", msg_option: t(:search)
