PostCalculator: add PostValues
EarlyRedemption: disable nextInterestColumn.PostCheck
This commit is contained in:
parent
4fbd107039
commit
5828d59095
@ -6,6 +6,7 @@ namespace EvoCalculator.Core.Models.PostCalculation.Models.Manager;
|
||||
public class ManagerResult
|
||||
{
|
||||
public PreparedValues PreparedValues { get; set; }
|
||||
public object PostValues { get; set; }
|
||||
public object NextValues { get; set; }
|
||||
public object Columns { get; set; }
|
||||
public List<string> Errors { get; set; }
|
||||
|
||||
@ -5,9 +5,9 @@
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\EvoCalculator.Core.Base\EvoCalculator.Core.Base.csproj"/>
|
||||
<ProjectReference Include="..\EvoCalculator.Core.Calculation\EvoCalculator.Core.Calculation.csproj"/>
|
||||
<ProjectReference Include="..\EvoCalculator.Core.Tools\EvoCalculator.Core.Tools.csproj"/>
|
||||
<ProjectReference Include="..\EvoCalculator.Core.Base\EvoCalculator.Core.Base.csproj" />
|
||||
<ProjectReference Include="..\EvoCalculator.Core.Calculation\EvoCalculator.Core.Calculation.csproj" />
|
||||
<ProjectReference Include="..\EvoCalculator.Core.Tools\EvoCalculator.Core.Tools.csproj" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
|
||||
@ -223,9 +223,13 @@ public static partial class CalculateManager
|
||||
* NEXT
|
||||
*/
|
||||
|
||||
var postValues = new PostValues.PostValues();
|
||||
postValues.ContractEconomy.ComputeValue(nextCashflowMSFOColumn, nextCreditColumn, preparedValues);
|
||||
|
||||
|
||||
return new ManagerResult
|
||||
{
|
||||
PostValues = postValues,
|
||||
NextValues = nextValues.GetValues(),
|
||||
PreparedValues = preparedValues,
|
||||
Columns = new
|
||||
|
||||
@ -156,8 +156,13 @@ public static partial class CalculateManager
|
||||
* NEXT
|
||||
*/
|
||||
|
||||
var postValues = new PostValues.PostValues();
|
||||
postValues.ContractEconomy.ComputeValue(nextCashflowMSFOColumn, nextCreditColumn, preparedValues);
|
||||
|
||||
|
||||
return new ManagerResult
|
||||
{
|
||||
PostValues = postValues,
|
||||
NextValues = nextValues.GetValues(),
|
||||
PreparedValues = preparedValues,
|
||||
Columns = new
|
||||
|
||||
@ -181,8 +181,13 @@ public static partial class CalculateManager
|
||||
* NEXT
|
||||
*/
|
||||
|
||||
var postValues = new PostValues.PostValues();
|
||||
postValues.ContractEconomy.ComputeValue(nextCashflowMSFOColumn, nextCreditColumn, preparedValues);
|
||||
|
||||
|
||||
return new ManagerResult
|
||||
{
|
||||
PostValues = postValues,
|
||||
NextValues = nextValues.GetValues(),
|
||||
PreparedValues = preparedValues,
|
||||
Columns = new
|
||||
|
||||
@ -209,7 +209,7 @@ public static partial class CalculateManager
|
||||
|
||||
var nextInterestColumn = new InterestColumn(nextCashflowMSFOForNIColumn.Values.Length);
|
||||
nextInterestColumn.ComputeValues(nextNIColumn, nextIRRGrColumn);
|
||||
nextInterestColumn.PostCheck(nextSumColumn, nextDateColumn, nextCashflowMSFOColumn.Dates);
|
||||
// nextInterestColumn.PostCheck(nextSumColumn, nextDateColumn, nextCashflowMSFOColumn.Dates);
|
||||
|
||||
var nextSumCurrentColumn = new SumCurrentColumn(preparedValues.Nmper.Next + 1);
|
||||
nextSumCurrentColumn.ComputeValues(nextSumWithVATColumn);
|
||||
@ -262,9 +262,13 @@ public static partial class CalculateManager
|
||||
* NEXT
|
||||
*/
|
||||
|
||||
var postValues = new PostValues.PostValues();
|
||||
postValues.ContractEconomy.ComputeValue(nextCashflowMSFOColumn, nextCreditColumn, preparedValues);
|
||||
|
||||
|
||||
return new ManagerResult
|
||||
{
|
||||
PostValues = postValues,
|
||||
NextValues = nextValues.GetValues(),
|
||||
PreparedValues = preparedValues,
|
||||
Columns = new
|
||||
|
||||
@ -226,9 +226,13 @@ public static partial class CalculateManager
|
||||
* NEXT
|
||||
*/
|
||||
|
||||
var postValues = new PostValues.PostValues();
|
||||
postValues.ContractEconomy.ComputeValue(nextCashflowMSFOColumn, nextCreditColumn, preparedValues);
|
||||
|
||||
|
||||
return new ManagerResult
|
||||
{
|
||||
PostValues = postValues,
|
||||
NextValues = nextValues.GetValues(),
|
||||
PreparedValues = preparedValues,
|
||||
Columns = new
|
||||
|
||||
@ -191,8 +191,13 @@ public static partial class CalculateManager
|
||||
* NEXT
|
||||
*/
|
||||
|
||||
var postValues = new PostValues.PostValues();
|
||||
postValues.ContractEconomy.ComputeValue(nextCashflowMSFOColumn, nextCreditColumn, preparedValues);
|
||||
|
||||
|
||||
return new ManagerResult
|
||||
{
|
||||
PostValues = postValues,
|
||||
NextValues = nextValues.GetValues(),
|
||||
PreparedValues = preparedValues,
|
||||
Columns = new
|
||||
|
||||
@ -0,0 +1,17 @@
|
||||
using System.Linq;
|
||||
using EvoCalculator.Core.Base.Columns;
|
||||
using EvoCalculator.Core.Base.PostValues;
|
||||
using EvoCalculator.Core.Models.PostCalculation.Models.Prepared;
|
||||
|
||||
namespace EvoCalculator.Core.PostCalculation.v1.Managers.PostValues;
|
||||
|
||||
public class ContractEconomy : BasePostValue<decimal>
|
||||
{
|
||||
public void ComputeValue(BaseColumn<decimal> nextCashflowMSFOColumn, BaseColumn<decimal> nextCreditColumn,
|
||||
PreparedValues preparedValues)
|
||||
{
|
||||
Value = nextCashflowMSFOColumn.Values.Sum()
|
||||
+ nextCreditColumn.GetValue(0)
|
||||
- preparedValues.BonusDirector;
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,19 @@
|
||||
namespace EvoCalculator.Core.PostCalculation.v1.Managers.PostValues;
|
||||
|
||||
public class PostValues
|
||||
{
|
||||
public ContractEconomy ContractEconomy;
|
||||
|
||||
public PostValues()
|
||||
{
|
||||
ContractEconomy = new ContractEconomy();
|
||||
}
|
||||
|
||||
public virtual object GetValues()
|
||||
{
|
||||
return new
|
||||
{
|
||||
ContractEconomy = ContractEconomy.Value,
|
||||
};
|
||||
}
|
||||
}
|
||||
Loading…
x
Reference in New Issue
Block a user