Merge pull request #9259 from jibees/reports-format-date-in-summary-row-as-in-normal-row

Reports, Order Cycle Customer Totals: Format date in summary row as it's formatted in a row
This commit is contained in:
Rachel Arnould
2022-06-09 14:29:01 +02:00
committed by GitHub
2 changed files with 6 additions and 1 deletions

View File

@@ -126,7 +126,7 @@ module Reporting
order_cycle: order.order_cycle&.name,
payment_method: order.payments.first&.payment_method&.name,
order_number: order.number,
date: order.completed_at,
date: order.completed_at.strftime("%F %T"),
}
end

View File

@@ -38,6 +38,11 @@ module Reporting
expect(report.rows.first.order_number).to eq order.number
expect(report.rows.first.date).to eq order.completed_at.strftime("%F %T")
end
it 'includes the summary row' do
expect(report.rows.second.quantity).to eq "TOTAL"
expect(report.rows.second.date).to eq order.completed_at.strftime("%F %T")
end
end
context "loading shipping methods" do