mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-03-22 05:18:51 +00:00
Showing Bulk Unit Size in BulkCoopReport
The group_buy_unit_size field is now shown even if 'group buy' is not enabled. And "Group By Unit Size" is now displayed as "Bulk Unit Size".
This commit is contained in:
@@ -9,6 +9,6 @@
|
||||
= f.label :group_buy_0, 'No'
|
||||
%br.clear
|
||||
= f.field_container :group_buy_unit_size do
|
||||
= f.label :group_buy_unit_size
|
||||
= f.label :bulk_unit_size
|
||||
%br
|
||||
= f.text_field :group_buy_unit_size
|
||||
|
||||
@@ -23,7 +23,7 @@ module OpenFoodNetwork
|
||||
when "bulk_coop_customer_payments"
|
||||
["Customer", "Date of Order", "Total Cost", "Amount Owing", "Amount Paid"]
|
||||
else
|
||||
["Supplier", "Product", "Unit Size", "Variant", "Weight", "Sum Total", "Sum Max Total", "Units Required", "Remainder"]
|
||||
["Supplier", "Product", "Bulk Unit Size", "Variant", "Weight", "Sum Total", "Sum Max Total", "Units Required", "Remainder"]
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@ require 'open_food_network/reports/bulk_coop_report'
|
||||
|
||||
module OpenFoodNetwork::Reports
|
||||
class BulkCoopAllocationReport < BulkCoopReport
|
||||
header "Customer", "Product", "Unit Size", "Variant", "Variant value", "Variant unit", "Weight", "Sum Total", "Total Available", "Unallocated", "Max quantity excess"
|
||||
header "Customer", "Product", "Bulk Unit Size", "Variant", "Variant value", "Variant unit", "Weight", "Sum Total", "Total Available", "Unallocated", "Max quantity excess"
|
||||
|
||||
organise do
|
||||
group { |li| li.variant.product }
|
||||
|
||||
@@ -22,11 +22,7 @@ module OpenFoodNetwork::Reports
|
||||
end
|
||||
|
||||
def group_buy_unit_size_f(lis)
|
||||
if lis.first.variant.product.group_buy
|
||||
group_buy_unit_size(lis)
|
||||
else
|
||||
""
|
||||
end
|
||||
group_buy_unit_size(lis)
|
||||
end
|
||||
|
||||
def total_amount(lis)
|
||||
|
||||
@@ -2,7 +2,7 @@ require 'open_food_network/reports/bulk_coop_report'
|
||||
|
||||
module OpenFoodNetwork::Reports
|
||||
class BulkCoopSupplierReport < BulkCoopReport
|
||||
header "Supplier", "Product", "Unit Size", "Variant", "Variant value", "Variant unit", "Weight", "Sum Total", "Units Required", "Unallocated", "Max quantity excess"
|
||||
header "Supplier", "Product", "Bulk Unit Size", "Variant", "Variant value", "Variant unit", "Weight", "Sum Total", "Units Required", "Unallocated", "Max quantity excess"
|
||||
|
||||
organise do
|
||||
group { |li| li.variant.product.supplier }
|
||||
|
||||
Reference in New Issue
Block a user