private void InitializeRedemptions() { foreach (var date in RedemptionSchedule.GetAllDates()) { Account.Instalments.Add(new Instalment { InstalmentType = "Redemptions", TransactionType = "Redemption", ValueDate = date }); } }
public decimal GetClosingBalanceForRedemptionsValue(decimal value) { foreach (var instalment in Redemptions.Values) { if (!instalment.HasFixedValue) { instalment.Amount = value; } } var lastDate = RedemptionSchedule.GetAllDates().Last(); Account.Snapshot(); Forecast(lastDate); var result = Principal.Value; Account.RestoreSnapshot(); return(result); }