From 15ea64b4093639bcba89184cdcb955b82ef5cc3f Mon Sep 17 00:00:00 2001 From: Maikel Linke Date: Thu, 10 Dec 2015 13:44:00 +1100 Subject: [PATCH] Add SKU to LettuceShare report --- lib/open_food_network/lettuce_share_report.rb | 2 ++ spec/features/admin/reports_spec.rb | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/lib/open_food_network/lettuce_share_report.rb b/lib/open_food_network/lettuce_share_report.rb index a532c00983..f629ba93ae 100644 --- a/lib/open_food_network/lettuce_share_report.rb +++ b/lib/open_food_network/lettuce_share_report.rb @@ -6,6 +6,7 @@ module OpenFoodNetwork [ "PRODUCT", "Description", + "SKU", "Qty", "Pack Size", "Unit", @@ -22,6 +23,7 @@ module OpenFoodNetwork [ variant.product.name, variant.full_name, + variant.sku, '', OptionValueNamer.new(variant).value, OptionValueNamer.new(variant).unit, diff --git a/spec/features/admin/reports_spec.rb b/spec/features/admin/reports_spec.rb index b3f42df669..dc4119422d 100644 --- a/spec/features/admin/reports_spec.rb +++ b/spec/features/admin/reports_spec.rb @@ -323,8 +323,8 @@ feature %q{ click_link 'Reports' click_link 'LettuceShare' - page.should have_table_row ['PRODUCT', 'Description', 'Qty', 'Pack Size', 'Unit', 'Unit Price', 'Total', 'GST incl.', 'Grower and growing method', 'Taxon'].map(&:upcase) - page.should have_table_row ['Product 2', '100g', '', '100', 'g', '99.0', '', '0', 'Supplier Name (Organic - NASAA 12345)', 'Taxon Name'] + page.should have_table_row ['PRODUCT', 'Description', 'SKU', 'Qty', 'Pack Size', 'Unit', 'Unit Price', 'Total', 'GST incl.', 'Grower and growing method', 'Taxon'].map(&:upcase) + page.should have_table_row ['Product 2', '100g', 'ABC', '', '100', 'g', '99.0', '', '0', 'Supplier Name (Organic - NASAA 12345)', 'Taxon Name'] end end