fix: 浮动端待实现收益分红
This commit is contained in:
@@ -913,7 +913,7 @@ namespace YLErp.Modules.SwapModule
|
||||
// 平仓数量/平仓前的数量*平仓对象的待实现分红收益,保留2位小数
|
||||
var yest = QdpCalendarHelper.GetNonHolidayDefore(flowEvent.EventDate.AddDays(-1));
|
||||
var eod = DbContext.eod_swap_position.Where(e => e.SwapTradeId == flowEvent.SwapTradeId && !e.Invalid && e.PosiQuantity > 0 && e.ValueDate == yest).FirstOrDefault();
|
||||
var dividendIn = eod.PosiProfitSum * unwindQty / eod.PosiQuantity;
|
||||
var dividendIn = eod.PosiDividendSum * unwindQty / eod.PosiQuantity;
|
||||
flowEvent.DividendIn = Math.Round(dividendIn, 2, MidpointRounding.AwayFromZero);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user