Add shipping method name to orders detail report

Added column allows users to see the shipping method of each order.
This commit is contained in:
sdbowen
2019-03-27 19:57:38 -06:00
parent 4455073f6d
commit 0f7ef2671f
3 changed files with 10 additions and 5 deletions

View File

@@ -10,7 +10,8 @@ module OpenFoodNetwork
end
def header
[I18n.t(:report_header_order_date),
[
I18n.t(:report_header_order_date),
I18n.t(:report_header_order_id),
I18n.t(:report_header_customer_name),
I18n.t(:report_header_customer_email),
@@ -28,7 +29,9 @@ module OpenFoodNetwork
I18n.t(:report_header_distributor_address),
I18n.t(:report_header_distributor_city),
I18n.t(:report_header_distributor_postcode),
I18n.t(:report_header_shipping_instructions)]
I18n.t(:report_header_shipping_method),
I18n.t(:report_header_shipping_instructions)
]
end
def search
@@ -95,6 +98,7 @@ module OpenFoodNetwork
order.distributor.address.address1,
order.distributor.address.city,
order.distributor.address.zipcode,
order.shipping_method.name,
order.special_instructions
]
end