29 lines
1.1 KiB
C#
29 lines
1.1 KiB
C#
using EvoCalculator.Core.Models.Calculation.Models.Prepared;
|
|
|
|
namespace EvoCalculator.Core.Calculation.Columns
|
|
{
|
|
public class SumRepaymentColumn : BaseColumn<decimal>
|
|
{
|
|
public SumRepaymentColumn(int count) : base(count)
|
|
{
|
|
}
|
|
|
|
private void PostCheck()
|
|
{
|
|
new CheckTools<decimal>().CheckColumnForZeroValue(Values);
|
|
}
|
|
|
|
public void ComputeValues(Constants.Calculation calculation, PreparedValues preparedValues,
|
|
SumCurrentColumn sumCurrentColumn, SumCurrentNegativeColumn sumCurrentNegativeColumn,
|
|
SumCurrentInterestColumn sumCurrentInterestColumn, SumCurrentTLMColumn sumCurrentTlmColumn)
|
|
{
|
|
for (var i = 7; i < Values.Length; i++)
|
|
Values[i] = sumCurrentColumn.Values[i] + sumCurrentNegativeColumn.Values[i] -
|
|
sumCurrentTlmColumn.Values[i] * (1 + (decimal) calculation.VatValue) -
|
|
sumCurrentInterestColumn.Values[i] * (1 + (decimal) calculation.VatValue) *
|
|
(decimal) preparedValues.Repayment;
|
|
|
|
PostCheck();
|
|
}
|
|
}
|
|
} |