Beispiel #1
0
 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);
     }
 }
Beispiel #2
0
        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);
        }
Beispiel #3
0
 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);
 }