From 9cfd7db99d52425ef5e023c8d3e48794470d76fa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=C3=A7ois=20Turbelin?= Date: Sun, 3 May 2020 17:57:20 +0200 Subject: [PATCH 1/2] Change date displayed on sales_tax reports --- lib/open_food_network/sales_tax_report.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/open_food_network/sales_tax_report.rb b/lib/open_food_network/sales_tax_report.rb index 1ce3f860dd..874561c339 100644 --- a/lib/open_food_network/sales_tax_report.rb +++ b/lib/open_food_network/sales_tax_report.rb @@ -57,7 +57,7 @@ module OpenFoodNetwork totals = totals_of order.line_items shipping_cost = shipping_cost_for order - [order.number, order.created_at, totals[:items], totals[:items_total], + [order.number, order.completed_at.strftime("%F %T"), totals[:items], totals[:items_total], totals[:taxable_total], totals[:sales_tax], shipping_cost, order.shipping_tax, order.enterprise_fee_tax, order.total_tax, order.bill_address.full_name, order.distributor.andand.name] end From 6e5cbebf4acf3901a374f499cb1bf46002e77f48 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=C3=A7ois=20Turbelin?= Date: Tue, 5 May 2020 10:46:17 +0200 Subject: [PATCH 2/2] Change date value on order_and_distributor_report --- lib/open_food_network/order_and_distributor_report.rb | 2 +- spec/lib/open_food_network/order_and_distributor_report_spec.rb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/open_food_network/order_and_distributor_report.rb b/lib/open_food_network/order_and_distributor_report.rb index b705c0cb16..570096cb23 100644 --- a/lib/open_food_network/order_and_distributor_report.rb +++ b/lib/open_food_network/order_and_distributor_report.rb @@ -92,7 +92,7 @@ module OpenFoodNetwork # @return [Array] def row_for(line_item, order) [ - order.created_at, + order.completed_at.strftime("%F %T"), order.id, order.bill_address.full_name, order.email, diff --git a/spec/lib/open_food_network/order_and_distributor_report_spec.rb b/spec/lib/open_food_network/order_and_distributor_report_spec.rb index 9843aa81ac..5b9e564b21 100644 --- a/spec/lib/open_food_network/order_and_distributor_report_spec.rb +++ b/spec/lib/open_food_network/order_and_distributor_report_spec.rb @@ -38,7 +38,7 @@ module OpenFoodNetwork table = subject.table expect(table[0]).to eq([ - order.reload.created_at, + order.reload.completed_at.strftime("%F %T"), order.id, bill_address.full_name, order.email,