mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-01-24 20:36:49 +00:00
Use receiver as "Fee Calc on Transfer Through" for outgoing exchanges
This commit is contained in:
@@ -282,7 +282,7 @@ module OrderManagement
|
||||
join_scope(
|
||||
<<-JOIN_STRING.strip_heredoc
|
||||
LEFT OUTER JOIN enterprises AS outgoing_exchange_enterprises
|
||||
ON (outgoing_exchange_enterprises.id = outgoing_exchanges.sender_id)
|
||||
ON (outgoing_exchange_enterprises.id = outgoing_exchanges.receiver_id)
|
||||
JOIN_STRING
|
||||
)
|
||||
end
|
||||
|
||||
@@ -116,9 +116,9 @@ describe OrderManagement::Reports::EnterpriseFeeSummary::ReportService do
|
||||
["Admin", "Sample Coordinator", "Coordinator Fee 1", "Sample Customer",
|
||||
"Coordinator", "All", "Sample Coordinator Tax", "1024.00"],
|
||||
["Admin", "Sample Distributor", "Distributor Fee 1", "Another Customer",
|
||||
"Outgoing", "Sample Coordinator", "Sample Distributor Tax", "4.00"],
|
||||
"Outgoing", "Sample Distributor", "Sample Distributor Tax", "4.00"],
|
||||
["Admin", "Sample Distributor", "Distributor Fee 1", "Sample Customer",
|
||||
"Outgoing", "Sample Coordinator", "Sample Distributor Tax", "8.00"],
|
||||
"Outgoing", "Sample Distributor", "Sample Distributor Tax", "8.00"],
|
||||
["Payment Transaction", "Sample Distributor", "Sample Payment Method", "Another Customer",
|
||||
nil, nil, nil, "2.00"],
|
||||
["Payment Transaction", "Sample Distributor", "Sample Payment Method", "Sample Customer",
|
||||
@@ -128,9 +128,9 @@ describe OrderManagement::Reports::EnterpriseFeeSummary::ReportService do
|
||||
["Sales", "Sample Coordinator", "Coordinator Fee 2", "Sample Customer",
|
||||
"Coordinator", "All", "Sample Product Tax", "2048.00"],
|
||||
["Sales", "Sample Distributor", "Distributor Fee 2", "Another Customer",
|
||||
"Outgoing", "Sample Coordinator", "Sample Product Tax", "8.00"],
|
||||
"Outgoing", "Sample Distributor", "Sample Product Tax", "8.00"],
|
||||
["Sales", "Sample Distributor", "Distributor Fee 2", "Sample Customer",
|
||||
"Outgoing", "Sample Coordinator", "Sample Product Tax", "16.00"],
|
||||
"Outgoing", "Sample Distributor", "Sample Product Tax", "16.00"],
|
||||
["Sales", "Sample Producer", "Producer Fee 1", "Another Customer",
|
||||
"Incoming", "Sample Producer", "Sample Producer Tax", "64.00"],
|
||||
["Sales", "Sample Producer", "Producer Fee 1", "Sample Customer",
|
||||
@@ -190,13 +190,13 @@ describe OrderManagement::Reports::EnterpriseFeeSummary::ReportService do
|
||||
["Admin", "Sample Coordinator", "Sample Coordinator Fee", "Sample Customer",
|
||||
"Incoming", "Sample Producer", "Sample Coordinator Tax", "512.00"],
|
||||
["Admin", "Sample Coordinator", "Sample Coordinator Fee", "Sample Customer",
|
||||
"Outgoing", "Sample Coordinator", "Sample Coordinator Tax", "512.00"],
|
||||
"Outgoing", "Sample Distributor", "Sample Coordinator Tax", "512.00"],
|
||||
["Admin", "Sample Distributor", "Sample Distributor Fee", "Sample Customer",
|
||||
"Incoming", "Sample Producer", "Sample Distributor Tax", "4.00"],
|
||||
["Payment Transaction", "Sample Distributor", "Sample Payment Method", "Sample Customer",
|
||||
nil, nil, nil, "2.00"],
|
||||
["Sales", "Sample Producer", "Sample Producer Fee", "Sample Customer",
|
||||
"Outgoing", "Sample Coordinator", "Sample Producer Tax", "64.00"],
|
||||
"Outgoing", "Sample Distributor", "Sample Producer Tax", "64.00"],
|
||||
["Shipment", "Sample Distributor", "Sample Shipping Method", "Sample Customer",
|
||||
nil, nil, "Platform Rate", "1.00"]
|
||||
]
|
||||
|
||||
Reference in New Issue
Block a user