bug修复
This commit is contained in:
Binary file not shown.
@@ -65,13 +65,13 @@ namespace YLErp.Plugins.ShanXi.DocumentGenerator
|
||||
payDate = QdpCalendarHelper.GetNonHoliday(flowEventGroup.EventDate.AddDays(sr));
|
||||
}
|
||||
row.PayDate = payDate.Value.ToString("yyyy-MM-dd");
|
||||
row.ClosePrice = ((flowEventGroup.TradingAmountAvg) * 100).OtcFormat(OtcFormatFlag.umprice);
|
||||
row.ClosePrice = ((flowEventGroup.TradingAmountAvg) * 100).ToString("0.00000000");
|
||||
decimal interestRate = unwindFlowEvents.Where(x => ConsTrade.InterestModels.Contains(x.InterestMode)).Sum(s => s.InterestRate);
|
||||
row.InterestRate = interestRate.ToString("0.00%");
|
||||
var PosiNotionalValue = flowEventGroup.Quantity * flowEventGroup.ContractSize* posi.PosiGrossPrice;
|
||||
row.Quantity= flowEventGroup.Quantity.ToString("0.00");
|
||||
row.PosiNotionalValue = PosiNotionalValue.ToString("0.00");
|
||||
row.PosiNetPrice = (posi.PosiGrossPrice * 100).OtcFormat(OtcFormatFlag.umprice);
|
||||
row.PosiNetPrice = (posi.PosiGrossPrice * 100).ToString("0.00000000");
|
||||
//var tradingFee = (flowEventGroup.TradingAmountFeeAvg- posi.PosiNetPrice- flowEventGroup.TradingAmountAvg+ posi.PosiGrossPrice)* PosiNotionalValue* ratio;
|
||||
var tradingFee = flowEventGroup.TradingFee + flowEventGroup.TradingFeePending;
|
||||
row.Fee = (-tradingFee).ToString("0.00");
|
||||
|
||||
@@ -877,7 +877,7 @@ namespace YLErp.Modules.SwapModule
|
||||
floatEvent.TradingAmountNetFeeAvg = unwindNetFee;
|
||||
floatEvent.TradingAmountNetAvg = unwindNet;
|
||||
floatEvent.TradingFeePending = position.PosiTradingFeePending * unwindData.ClosePercent;
|
||||
floatEvent.TradingFeePending = Math.Round(floatEvent.TradingFeePending, 2, MidpointRounding.AwayFromZero);
|
||||
floatEvent.TradingFeePending = Math.Round(floatEvent.TradingFeePending, 4, MidpointRounding.AwayFromZero);
|
||||
floatEvent.TradingFee = closeFee;
|
||||
floatEvent.MarkClosePnl = (unwindPrice - position.PosiGrossPrice) * unwindQty * floatRatio * longRatio;
|
||||
floatEvent.MarkClosePnl = Math.Round(floatEvent.MarkClosePnl + ((floatEvent.TradingFeePending+ closeFee) * floatRatio * -1), ConsGlobal.MoneyRound, MidpointRounding.AwayFromZero);
|
||||
|
||||
@@ -698,6 +698,7 @@ namespace YLErp.Modules.SwapModule
|
||||
}
|
||||
flowMergeClone.TradingAmount = Math.Abs(amount);
|
||||
flowMergeClone.TradingFeePending = flowMergeClone.TradingFeePending * qtyAbs / flowMergeClone.TradingQty;//剩余后付费用
|
||||
flowMergeClone.TradingFeePending = Math.Round(flowMergeClone.TradingFeePending, 4, MidpointRounding.AwayFromZero);
|
||||
flowMergeClone.TradingQty = qtyAbs;
|
||||
if (qty > 0)//交易有剩余新开仓
|
||||
{
|
||||
@@ -1333,6 +1334,7 @@ namespace YLErp.Modules.SwapModule
|
||||
var newQtyAbs = Math.Abs(newQty);
|
||||
flowMerge.SwapTradeNo = td.TradeNumber;
|
||||
var unwindFee= newQty>0? flowMerge.TradingFeePending: flowMerge.TradingFeePending* floatPosition.PosiQuantity / flowMerge.TradingQty;
|
||||
unwindFee = Math.Round(unwindFee, 4, MidpointRounding.AwayFromZero);
|
||||
// 全平
|
||||
new SwapDealService(UserInfo).AuotoSwapUnwind(td.id,
|
||||
flowMerge.TradingAmountAvg,
|
||||
|
||||
Reference in New Issue
Block a user