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:
Maikel Linke
2015-09-03 12:26:40 +10:00
parent 57caeb64c5
commit 0fdd000589
5 changed files with 5 additions and 9 deletions

View File

@@ -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

View File

@@ -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

View File

@@ -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 }

View File

@@ -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)

View File

@@ -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 }