public override void ProcessInterest(SimulationState state, DateTime date) { if (Interest > 0 && !IsPaidOff && date >= Due.Start) { var amount = (Interest / 12m) * Balance; state.Withdraw(date, this, $"Interest ({Interest:P2})", amount); } }
public void Process(SimulationState state, DateTime date) { if (IsPaidOff) { return; } var payment = Payment; if (state.IsSnowball && state.SnowballTarget == this) { payment += state.SnowballAmount; } if (payment > Balance) { // if we make this payment; we'll overpay payment = Balance; } state.Deposit(date, this, "Payment", payment); state.Withdraw(date, AccountId, Name, payment); }
public void Process(SimulationState state, DateTime date) { state.Withdraw(date, FromId, Name, Amount); state.Deposit(date, ToId, Name, Amount); }
public void Process(SimulationState state, DateTime date) { state.Withdraw(date, AccountId, Name, Payment); }