mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-03-20 04:59:16 +00:00
Reinstate variant full name column - needed to identify variants differing only by description
This commit is contained in:
@@ -2,7 +2,7 @@ require 'open_food_network/reports/bulk_coop_report'
|
||||
|
||||
module OpenFoodNetwork::Reports
|
||||
class BulkCoopAllocationReport < BulkCoopReport
|
||||
header "Customer", "Product", "Unit Size", "Variant value", "Variant unit", "Weight", "Sum Total", "Sum Max Total", "Total Available", "Unallocated"
|
||||
header "Customer", "Product", "Unit Size", "Variant", "Variant value", "Variant unit", "Weight", "Sum Total", "Sum Max Total", "Total Available", "Unallocated"
|
||||
|
||||
organise do
|
||||
group { |li| li.variant.product }
|
||||
@@ -15,6 +15,7 @@ module OpenFoodNetwork::Reports
|
||||
column { |lis| "" }
|
||||
column { |lis| "" }
|
||||
column { |lis| "" }
|
||||
column { |lis| "" }
|
||||
column { |lis| total_amount(lis) }
|
||||
column { |lis| total_max_quantity_amount(lis) }
|
||||
column { |lis| total_available(lis) }
|
||||
@@ -36,6 +37,7 @@ module OpenFoodNetwork::Reports
|
||||
column { |lis| lis.first.order.bill_address.firstname + " " + lis.first.order.bill_address.lastname }
|
||||
column { |lis| lis.first.variant.product.name }
|
||||
column { |lis| lis.first.variant.product.group_buy ? (lis.first.variant.product.group_buy_unit_size || 0.0) : "" }
|
||||
column { |lis| lis.first.variant.full_name }
|
||||
column { |lis| OpenFoodNetwork::OptionValueNamer.new(lis.first.variant).value }
|
||||
column { |lis| OpenFoodNetwork::OptionValueNamer.new(lis.first.variant).unit }
|
||||
column { |lis| lis.first.variant.weight || 0 }
|
||||
|
||||
@@ -2,7 +2,7 @@ require 'open_food_network/reports/bulk_coop_report'
|
||||
|
||||
module OpenFoodNetwork::Reports
|
||||
class BulkCoopSupplierReport < BulkCoopReport
|
||||
header "Supplier", "Product", "Unit Size", "Variant value", "Variant unit", "Weight", "Sum Total", "Sum Max Total", "Units Required", "Unallocated"
|
||||
header "Supplier", "Product", "Unit Size", "Variant", "Variant value", "Variant unit", "Weight", "Sum Total", "Sum Max Total", "Units Required", "Unallocated"
|
||||
|
||||
organise do
|
||||
group { |li| li.variant.product.supplier }
|
||||
@@ -19,6 +19,7 @@ module OpenFoodNetwork::Reports
|
||||
column { |lis| "" }
|
||||
column { |lis| "" }
|
||||
column { |lis| "" }
|
||||
column { |lis| "" }
|
||||
column { |lis| total_amount(lis) }
|
||||
column { |lis| total_max_quantity_amount(lis) }
|
||||
column { |lis| units_required(lis) }
|
||||
@@ -36,6 +37,7 @@ module OpenFoodNetwork::Reports
|
||||
column { |lis| supplier_name(lis) }
|
||||
column { |lis| product_name(lis) }
|
||||
column { |lis| group_buy_unit_size_f(lis) }
|
||||
column { |lis| lis.first.variant.full_name }
|
||||
column { |lis| OpenFoodNetwork::OptionValueNamer.new(lis.first.variant).value }
|
||||
column { |lis| OpenFoodNetwork::OptionValueNamer.new(lis.first.variant).unit }
|
||||
column { |lis| lis.first.variant.weight || 0 }
|
||||
|
||||
Reference in New Issue
Block a user