Exclude non-eligible entries from report

This commit is contained in:
Kristina Lim
2019-02-18 09:30:03 +08:00
parent 8ce7337c9d
commit 19f99255fa
2 changed files with 3 additions and 7 deletions

View File

@@ -46,7 +46,7 @@ module OrderManagement
def find_adjustments
chain_to_scope do
Spree::Adjustment
Spree::Adjustment.eligible
end
end

View File

@@ -165,11 +165,9 @@ describe OrderManagement::Reports::EnterpriseFeeSummary::ReportService do
it "is included" do
totals = service.list
expect(totals.length).to eq(2)
expect(totals.length).to eq(1)
expected_result = [
["Payment Transaction", "Sample Distributor", "Sample Payment Method", "Sample Customer",
nil, nil, nil, "2.00"],
["Shipment", "Sample Distributor", "Sample Shipping Method", "Sample Customer",
nil, nil, "Platform Rate", "1.00"]
]
@@ -202,11 +200,9 @@ describe OrderManagement::Reports::EnterpriseFeeSummary::ReportService do
it "is included" do
totals = service.list
expect(totals.length).to eq(3)
expect(totals.length).to eq(2)
expected_result = [
["Admin", "Sample Distributor", "Sample Enterprise Fee", "Sample Customer",
"Outgoing", "Sample Distributor", nil, "0.00"],
["Payment Transaction", "Sample Distributor", "Sample Payment Method", "Sample Customer",
nil, nil, nil, "2.00"],
["Shipment", "Sample Distributor", "Sample Shipping Method", "Sample Customer",