mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-03-27 06:05:19 +00:00
Show order notes (special instructions) on report and confirmation email
This commit is contained in:
@@ -475,7 +475,7 @@ Spree::Admin::ReportsController.class_eval do
|
||||
@include_blank = 'All'
|
||||
|
||||
header = ["Hub", "Customer", "Email", "Phone", "Producer", "Product", "Variant", "Amount", "Item ($)", "Dist ($)", "Ship ($)", "Total ($)", "Paid?",
|
||||
"Shipping", "Delivery?", "Ship street", "Ship street 2", "Ship city", "Ship postcode", "Ship state"]
|
||||
"Shipping", "Delivery?", "Ship street", "Ship street 2", "Ship city", "Ship postcode", "Ship state", "Order notes"]
|
||||
|
||||
rsa = proc { |line_items| line_items.first.order.shipping_method.andand.require_ship_address }
|
||||
|
||||
@@ -499,7 +499,9 @@ Spree::Admin::ReportsController.class_eval do
|
||||
proc { |line_items| line_items.first.order.ship_address.andand.address2 if rsa.call(line_items) },
|
||||
proc { |line_items| line_items.first.order.ship_address.andand.city if rsa.call(line_items) },
|
||||
proc { |line_items| line_items.first.order.ship_address.andand.zipcode if rsa.call(line_items) },
|
||||
proc { |line_items| line_items.first.order.ship_address.andand.state if rsa.call(line_items) }]
|
||||
proc { |line_items| line_items.first.order.ship_address.andand.state if rsa.call(line_items) },
|
||||
|
||||
proc { |line_items| line_items.first.order.special_instructions }]
|
||||
|
||||
rules = [ { group_by: proc { |line_item| line_item.order.distributor },
|
||||
sort_by: proc { |distributor| distributor.name } },
|
||||
@@ -525,6 +527,8 @@ Spree::Admin::ReportsController.class_eval do
|
||||
proc { |line_items| "" },
|
||||
proc { |line_items| "" },
|
||||
proc { |line_items| "" },
|
||||
proc { |line_items| "" },
|
||||
|
||||
proc { |line_items| "" } ] },
|
||||
|
||||
{ group_by: proc { |line_item| line_item.variant.product },
|
||||
|
||||
@@ -54,6 +54,9 @@ Ready for collection: <%= @order.order_cycle.pickup_time_for(@order.distributor)
|
||||
Collection instructions: <%= @order.order_cycle.pickup_instructions_for(@order.distributor) %>
|
||||
|
||||
<% end %>
|
||||
<% end %>
|
||||
<% if @order.special_instructions.present? %>Order notes: <%= @order.special_instructions %>
|
||||
|
||||
<% end %>
|
||||
|
||||
Thanks for your support.
|
||||
|
||||
Reference in New Issue
Block a user