From 3a9c4e08268694231ce5be6e1aa6beb6c35a7676 Mon Sep 17 00:00:00 2001 From: Rob Harrington Date: Fri, 12 Dec 2014 11:59:45 +1100 Subject: [PATCH] Adding a price without fees column to the order cycle customer report --- app/controllers/spree/admin/reports_controller_decorator.rb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/app/controllers/spree/admin/reports_controller_decorator.rb b/app/controllers/spree/admin/reports_controller_decorator.rb index 0aa41dbc05..02aba3fe9a 100644 --- a/app/controllers/spree/admin/reports_controller_decorator.rb +++ b/app/controllers/spree/admin/reports_controller_decorator.rb @@ -475,7 +475,7 @@ Spree::Admin::ReportsController.class_eval do table_items = @line_items @include_blank = 'All' - header = ["Hub", "Customer", "Email", "Phone", "Producer", "Product", "Variant", "Amount", "Item ($)", "Dist ($)", "Ship ($)", "Total ($)", "Paid?", + header = ["Hub", "Customer", "Email", "Phone", "Producer", "Product", "Variant", "Amount", "Item ($)", "Item + Fees ($)", "Dist ($)", "Ship ($)", "Total ($)", "Paid?", "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 } @@ -488,6 +488,7 @@ Spree::Admin::ReportsController.class_eval do proc { |line_items| line_items.first.variant.product.name }, proc { |line_items| line_items.first.variant.full_name }, proc { |line_items| line_items.sum { |li| li.quantity } }, + proc { |line_items| line_items.sum { |li| li.amount } }, proc { |line_items| line_items.sum { |li| li.amount_with_adjustments } }, proc { |line_items| "" }, proc { |line_items| "" }, @@ -516,6 +517,7 @@ Spree::Admin::ReportsController.class_eval do proc { |line_items| "TOTAL" }, proc { |line_items| "" }, proc { |line_items| "" }, + proc { |line_items| line_items.sum { |li| li.amount } }, proc { |line_items| line_items.sum { |li| li.amount_with_adjustments } }, proc { |line_items| line_items.map { |li| li.order }.uniq.sum { |o| o.admin_and_handling_total } }, proc { |line_items| line_items.map { |li| li.order }.uniq.sum { |o| o.ship_total } },