Do not include incomplete orders in report

This commit is contained in:
Kristina Lim
2018-12-14 20:06:08 +08:00
committed by luisramos0
parent eaa7800427
commit 4a73b1d26c
2 changed files with 2 additions and 0 deletions

View File

@@ -82,6 +82,7 @@ module OrderManagement
ON (
spree_adjustments.adjustable_type = 'Spree::Order'
AND spree_orders.id = spree_adjustments.adjustable_id
AND spree_orders.completed_at IS NOT NULL
)
JOIN_STRING
)

View File

@@ -77,6 +77,7 @@ describe OrderManagement::Reports::EnterpriseFeeSummary::ReportService do
describe "grouping and sorting of entries" do
let!(:customer_order) { prepare_order(customer: customer) }
let!(:customer_incomplete_order) { setup_order(customer: customer) }
let!(:second_customer_order) { prepare_order(customer: customer) }
let!(:other_customer_order) { prepare_order(customer: another_customer) }