mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-02-05 22:26:07 +00:00
Exclude non-eligible entries from report
This commit is contained in:
@@ -46,7 +46,7 @@ module OrderManagement
|
||||
|
||||
def find_adjustments
|
||||
chain_to_scope do
|
||||
Spree::Adjustment
|
||||
Spree::Adjustment.eligible
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
@@ -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",
|
||||
|
||||
Reference in New Issue
Block a user