fix:手动互换不再产生应付预付金支出

This commit is contained in:
马冰冰
2026-08-06 14:44:30 +08:00
parent c1c2ed9dda
commit 15bf1a90ab
3 changed files with 64 additions and 1 deletions
@@ -85,6 +85,10 @@ namespace YLErp.Modules.SwapModule
if (unwindData.FlowEvents.Any(x => !string.IsNullOrEmpty(x.UnderlyingCode)))
{
CalcCloseAmount(unwindData);
if (eventType == (int)SwapEventTypeEnum.)
{
unwindData.SwapMarginAmount = 0;
}
return;
}
@@ -1868,7 +1872,7 @@ namespace YLErp.Modules.SwapModule
var flowList = FindFlowEventsByEventId(swapEvent.id);
string action = eventType == (int)SwapEventTypeEnum. ? ClientCashInCashOut._互换 : ClientCashInCashOut._平仓费;
int clientCashId = AddClientCash(td, Convert.ToDouble(-swapEvent.unwindData.SwapRealizedPnL), action, swapEvent.unwindData.ValueDate);
if (swapEvent.unwindData.SwapMarginAmount != 0)
if (eventType == (int)SwapEventTypeEnum. && swapEvent.unwindData.SwapMarginAmount != 0)
{
AddClientCash(td, Convert.ToDouble(swapEvent.unwindData.SwapMarginAmount), ClientCashInCashOut._应付预付金, swapEvent.unwindData.ValueDate);
}