Внести изменение в Метод расчета Досрочный выкуп EarlyRedemption:

если PV.ChangeRepayment = True и PV.Repayment > 0, то идем в ветку пересчета скидки
иначе заменяем  i=RepaymentPayment(i+1) из PVTablePayment.Current на новый параметр PV.SumRepayment
This commit is contained in:
Chika 2022-09-29 16:05:05 +03:00
parent 9577dcd2ed
commit b8f8594cff
2 changed files with 5 additions and 4 deletions

View File

@ -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; }
}

View File

@ -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)
// вычитает последний платеж из того что посчитали выше