Show order notes (special instructions) on report and confirmation email

This commit is contained in:
Rohan Mitchell
2014-07-23 11:51:18 +10:00
parent d1b2f01578
commit 3dd7b296be
2 changed files with 9 additions and 2 deletions

View File

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

View File

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