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,