From 4e6f07de8a6a44934ad0e480d334ef0f2b53fa61 Mon Sep 17 00:00:00 2001 From: Rohan Mitchell Date: Wed, 11 Jun 2014 20:36:27 +1000 Subject: [PATCH] WIP (tests reqd): Customers and products+inventory reports handle nil order cycle times --- app/views/spree/admin/reports/customers.html.haml | 3 +-- app/views/spree/admin/reports/products_and_inventory.html.haml | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/app/views/spree/admin/reports/customers.html.haml b/app/views/spree/admin/reports/customers.html.haml index 726d068010..ebe1d31492 100644 --- a/app/views/spree/admin/reports/customers.html.haml +++ b/app/views/spree/admin/reports/customers.html.haml @@ -13,9 +13,8 @@ %br = label_tag nil, "Order Cycle: " - - order_cycles_select = @order_cycles.collect {|oc| [ "#{oc.name}   (#{oc.orders_open_at.to_s(:short)} - #{oc.orders_close_at.to_s(:short)})".html_safe, oc.id ] } = select_tag(:order_cycle_id, - options_for_select(order_cycles_select, params[:order_cycle_id]), + options_for_select(report_order_cycle_options(@order_cycles), params[:order_cycle_id]), include_blank: true) %br diff --git a/app/views/spree/admin/reports/products_and_inventory.html.haml b/app/views/spree/admin/reports/products_and_inventory.html.haml index 93859d0c58..f5e0b9ce6b 100644 --- a/app/views/spree/admin/reports/products_and_inventory.html.haml +++ b/app/views/spree/admin/reports/products_and_inventory.html.haml @@ -13,9 +13,8 @@ %br = label_tag nil, "Order Cycle: " - - order_cycles_select = @order_cycles.collect {|oc| [ "#{oc.name}   (#{oc.orders_open_at.to_s(:short)} - #{oc.orders_close_at.to_s(:short)})".html_safe, oc.id ] } = select_tag(:order_cycle_id, - options_for_select(order_cycles_select, params[:order_cycle_id]), + options_for_select(report_order_cycle_options(@order_cycles), params[:order_cycle_id]), include_blank: true) %br