Fixing some minor report bugs

This commit is contained in:
Will Marshall
2013-12-13 10:12:41 +11:00
parent e70513b06c
commit e98031e581
3 changed files with 4 additions and 2 deletions

View File

@@ -50,6 +50,8 @@ Spree::Admin::ReportsController.class_eval do
@report_types = REPORT_TYPES[:customers]
@report_type = params[:report_type]
@report = OpenFoodNetwork::CustomersReport.new spree_current_user, params
render_report(@report.header, @report.table, params[:csv], "customers.csv")
end
def orders_and_distributors
@@ -557,6 +559,7 @@ Spree::Admin::ReportsController.class_eval do
@report = OpenFoodNetwork::ProductsAndInventoryReport.new spree_current_user, params
#@table = @report.table
#@header = @report.header
render_report(@report.header, @report.table, params[:csv], "products_and_inventory.csv")
end
def render_report (header, table, create_csv, csv_file_name)

View File

@@ -20,7 +20,7 @@
%br
= label_tag nil, "Report Type: "
= select_tag(:report_type, options_for_select(@report_types, @report_type))
= select_tag(:report_type, options_for_select(@report_types, params[:report_type]))
%br
%br

View File

@@ -150,6 +150,5 @@ feature %q{
].sort
end
end
end