From b8f8594cffc2ae6b7320c35b648da56032d9fe11 Mon Sep 17 00:00:00 2001 From: Chika Date: Thu, 29 Sep 2022 16:05:05 +0300 Subject: [PATCH] =?UTF-8?q?=D0=92=D0=BD=D0=B5=D1=81=D1=82=D0=B8=20=D0=B8?= =?UTF-8?q?=D0=B7=D0=BC=D0=B5=D0=BD=D0=B5=D0=BD=D0=B8=D0=B5=20=D0=B2=20?= =?UTF-8?q?=D0=9C=D0=B5=D1=82=D0=BE=D0=B4=20=D1=80=D0=B0=D1=81=D1=87=D0=B5?= =?UTF-8?q?=D1=82=D0=B0=20=D0=94=D0=BE=D1=81=D1=80=D0=BE=D1=87=D0=BD=D1=8B?= =?UTF-8?q?=D0=B9=20=D0=B2=D1=8B=D0=BA=D1=83=D0=BF=20EarlyRedemption:=20?= =?UTF-8?q?=D0=B5=D1=81=D0=BB=D0=B8=20PV.ChangeRepayment=20=3D=20True=20?= =?UTF-8?q?=D0=B8=20PV.Repayment=20>=200,=20=D1=82=D0=BE=20=D0=B8=D0=B4?= =?UTF-8?q?=D0=B5=D0=BC=20=D0=B2=20=D0=B2=D0=B5=D1=82=D0=BA=D1=83=20=D0=BF?= =?UTF-8?q?=D0=B5=D1=80=D0=B5=D1=81=D1=87=D0=B5=D1=82=D0=B0=20=D1=81=D0=BA?= =?UTF-8?q?=D0=B8=D0=B4=D0=BA=D0=B8=20=D0=B8=D0=BD=D0=B0=D1=87=D0=B5=20?= =?UTF-8?q?=D0=B7=D0=B0=D0=BC=D0=B5=D0=BD=D1=8F=D0=B5=D0=BC=20=20i=3DRepay?= =?UTF-8?q?mentPayment(i+1)=20=D0=B8=D0=B7=20PVTablePayment.Current=20?= =?UTF-8?q?=D0=BD=D0=B0=20=D0=BD=D0=BE=D0=B2=D1=8B=D0=B9=20=D0=BF=D0=B0?= =?UTF-8?q?=D1=80=D0=B0=D0=BC=D0=B5=D1=82=D1=80=20PV.SumRepayment?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../PostCalculation/Models/Prepared/PreparedValues.cs | 1 + .../v1/Columns/Next/SumColumn/SumColumnVT3.cs | 8 ++++---- 2 files changed, 5 insertions(+), 4 deletions(-) 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) // вычитает последний платеж из того что посчитали выше