diff --git a/EvoCalculator.Core.Models/PostCalculation/Models/Prepared/PreparedValues.cs b/EvoCalculator.Core.Models/PostCalculation/Models/Prepared/PreparedValues.cs index a91a579..2cba157 100644 --- a/EvoCalculator.Core.Models/PostCalculation/Models/Prepared/PreparedValues.cs +++ b/EvoCalculator.Core.Models/PostCalculation/Models/Prepared/PreparedValues.cs @@ -70,4 +70,5 @@ public class PreparedValues [Range(10000, int.MaxValue)] public decimal BaseCost { get; set; } [Range(10000, int.MaxValue)] public decimal AcquisitionExpenses { get; set; } public decimal NiAtInception { get; set; } + public decimal SumRepayment { get; set; } } \ No newline at end of file diff --git a/EvoCalculator.Core.PostCalculation/v1/Columns/Next/SumColumn/SumColumnVT3.cs b/EvoCalculator.Core.PostCalculation/v1/Columns/Next/SumColumn/SumColumnVT3.cs index d6209f8..202a78f 100644 --- a/EvoCalculator.Core.PostCalculation/v1/Columns/Next/SumColumn/SumColumnVT3.cs +++ b/EvoCalculator.Core.PostCalculation/v1/Columns/Next/SumColumn/SumColumnVT3.cs @@ -34,11 +34,11 @@ public class SumColumnVT3 : BaseSumColumn } else if (i == _preparedValues.EditPaymentNumber) { - if (_preparedValues.ChangeRepayment == false) - Values[i] = _currentTablePayments[i - 1].RepaymentPayment / - (decimal) (1 + _constants.VatValue); - else + if (_preparedValues.ChangeRepayment && _preparedValues.Repayment > 0) Values[i] = techNextSumRepaymentColumn.GetValue(i) / (decimal) (1 + _constants.VatValue); + else + Values[i] = _preparedValues.SumRepayment / + (decimal) (1 + _constants.VatValue); if (_preparedValues.LastPaymentFix) // вычитает последний платеж из того что посчитали выше