修复平仓为计算税的问题, 修复日终结算未考虑起算日的问题.
This commit is contained in:
@@ -1144,7 +1144,7 @@ namespace YLErp.Modules.SwapModule
|
||||
var price = UnderlyingCodePrice(eod.UnderlyingCode, dealDate, out decimal vobp);
|
||||
decimal tax = um.ValueAddedTax ?? 0;
|
||||
BondPaymentService bondPaymentService = new BondPaymentService(UserInfo);
|
||||
if (valueDate > td.StartDate.Value && (curretEod.PosiQuantity > 0 || valueDate == td.UnWindDate))
|
||||
if (valueDate > td.StartDate.Value && curretEod.PosiQuantity > 0)
|
||||
{
|
||||
decimal payment = bondPaymentService.CalcPayment(curretEod.UnderlyingCode, eod.ValueDate, valueDate, curretEod.PosiQuantity, shortRatio, directionRatio);
|
||||
// 考虑增值税
|
||||
@@ -1226,12 +1226,15 @@ namespace YLErp.Modules.SwapModule
|
||||
curretEod.UnderlyingPrice = price;
|
||||
curretEod.UnderlyingMarketValue = curretEod.UnderlyingPrice * curretEod.PosiQuantity * curretEod.ContractSize * shortRatio;
|
||||
curretEod.PosiMtmPnL = (curretEod.UnderlyingPrice - curretEod.PosiGrossPrice) * curretEod.PosiQuantity * curretEod.ContractSize * shortRatio * directionRatio;
|
||||
|
||||
decimal tax = um.ValueAddedTax ?? 0;
|
||||
BondPaymentService bondPaymentService = new BondPaymentService(UserInfo);
|
||||
decimal payment = bondPaymentService.CalcPayment(curretEod.UnderlyingCode, eod.ValueDate, valueDate, curretEod.PosiQuantity, shortRatio, directionRatio);
|
||||
// 考虑增值税
|
||||
curretEod.TdPosiDividend = payment / (1 + tax) * (1 - tax);
|
||||
curretEod.TdPosiDividend = 0;
|
||||
if (valueDate > td.StartDate.Value && (curretEod.PosiQuantity > 0))
|
||||
{
|
||||
decimal tax = um.ValueAddedTax ?? 0;
|
||||
BondPaymentService bondPaymentService = new BondPaymentService(UserInfo);
|
||||
decimal payment = bondPaymentService.CalcPayment(curretEod.UnderlyingCode, eod.ValueDate, valueDate, curretEod.PosiQuantity, shortRatio, directionRatio);
|
||||
// 考虑增值税
|
||||
curretEod.TdPosiDividend = payment / (1 + tax) * (1 - tax);
|
||||
}
|
||||
curretEod.RealizedMtmPnL = eod.RealizedMtmPnL + curretEod.TdCloseMtmPnl;
|
||||
|
||||
curretEod.RealizedFee = eod.RealizedFee + curretEod.TdCloseFee;
|
||||
|
||||
Reference in New Issue
Block a user