mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-02-01 21:47:16 +00:00
47 lines
1.2 KiB
Plaintext
47 lines
1.2 KiB
Plaintext
= form_tag spree.customers_admin_reports_url do |f|
|
|
%br
|
|
= label_tag nil, "Distributor: "
|
|
= select_tag(:distributor_id,
|
|
options_from_collection_for_select(@distributors, :id, :name, params[:distributor_id]),
|
|
:include_blank => true)
|
|
|
|
%br
|
|
= label_tag nil, "Supplier: "
|
|
= select_tag(:supplier_id,
|
|
options_from_collection_for_select(@suppliers, :id, :name, params[:supplier_id]),
|
|
:include_blank => true)
|
|
|
|
%br
|
|
= label_tag nil, "Order Cycle: "
|
|
= select_tag(:order_cycle_id,
|
|
options_for_select(report_order_cycle_options(@order_cycles), params[:order_cycle_id]),
|
|
include_blank: true)
|
|
|
|
%br
|
|
= label_tag nil, "Report Type: "
|
|
= select_tag(:report_type, options_for_select(@report_types, @report_type))
|
|
|
|
%br
|
|
%br
|
|
= check_box_tag :csv
|
|
= label_tag :csv, "Download as csv"
|
|
%br
|
|
= button t(:search)
|
|
|
|
%br
|
|
%br
|
|
%table#listing_customers.index
|
|
%thead
|
|
%tr{'data-hook' => "orders_header"}
|
|
- @report.header.each do |heading|
|
|
%th=heading
|
|
%tbody
|
|
- @report.table.each do |row|
|
|
%tr
|
|
- row.each do |column|
|
|
%td= column
|
|
- if @report.table.empty?
|
|
%tr
|
|
%td{:colspan => "2"}= t(:none)
|
|
|