Use receiver as "Fee Calc on Transfer Through" for outgoing exchanges

This commit is contained in:
Kristina Lim
2019-01-11 07:20:23 +08:00
committed by luisramos0
parent ddf15f1d30
commit f59834ddc8
2 changed files with 7 additions and 7 deletions

View File

@@ -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

View File

@@ -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"]
]