refactor(return-leg): SwapDealService 增值税公式替换为 DividendCalc
SwapDealService:1806 inline 的 dividendIn/(1+tax)*(1-tax) 替换为 DividendCalc.AfterTaxRaw(中间计算不四舍五入)。 全库 payment/(1+tax)*(1-tax) inline 公式: 5处(SwapEod 4 + SwapDeal 1) → 0。 全部收敛到 DividendCalc.AfterTax / AfterTaxRaw。 验证: 编译0错误, 全量507测试7失败(基线一致)。
This commit is contained in:
@@ -13,6 +13,7 @@ using YLErp.Modules.TradeModule;
|
||||
using YLErp.Modules.TradeModule.DealModule;
|
||||
using YLErp.Modules.SwapModule.FundingLegs;
|
||||
using YLErp.Modules.SwapModule.Margin;
|
||||
using YLErp.Modules.SwapModule.ReturnLegs;
|
||||
using YLErp.QdpModule;
|
||||
|
||||
namespace YLErp.Modules.SwapModule
|
||||
@@ -1803,7 +1804,7 @@ namespace YLErp.Modules.SwapModule
|
||||
var dividendIn = servie.CalcPayment(payments, unwindQty, shortRatio, directionRatio);
|
||||
var um = DataCacheProvider.GetUnderlyingDataSource().GetData(flowEvent.UnderlyingCode);
|
||||
decimal tax = um.ValueAddedTax ?? 0;
|
||||
dividendIn = dividendIn / (1 + tax) * (1 - tax);
|
||||
dividendIn = DividendCalc.AfterTaxRaw(dividendIn, tax);
|
||||
|
||||
flowEvent.DividendIn = Math.Round(dividendIn, 2, MidpointRounding.AwayFromZero);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user