Beispiel #1
0
        public override List <PaymentTable> CreatePaymentTable()
        {
            List <PaymentTable> result = new List <PaymentTable>();
            double fileExpense         = 0;

            if (this.IsBireysel)
            {
                fileExpense += 400;
            }
            else
            {
                fileExpense += 0;
            }


            double totalAmount = this.Amount + (this.Amount * (this.GetInterestRate() / 100) * this.Maturity) + fileExpense;

            int id = 0;

            while (Maturity > id)
            {
                id++;
                PaymentTable entity = new PaymentTable();
                entity.ID               = id;
                entity.Amount           = totalAmount / Maturity;
                entity.PaymentDate      = System.DateTime.Today.AddMonths(id);
                entity.RemainingBalance = totalAmount - (id * entity.Amount);
                result.Add(entity);
            }
            return(result);
        }
Beispiel #2
0
        public override List <PaymentTable> CreatePaymentTable()
        {
            List <PaymentTable> result = new List <PaymentTable>();
            double profitRate          = this.GetInterestRate();

            if (this.IsNew)
            {
                profitRate = profitRate * 0.5;
            }


            double totalAmount = this.Amount + (this.Amount * (profitRate / 100) * this.Maturity);

            int id = 0;

            while (Maturity > id)
            {
                id++;
                PaymentTable entity = new PaymentTable();
                entity.ID               = id;
                entity.Amount           = totalAmount / Maturity;
                entity.PaymentDate      = System.DateTime.Today.AddMonths(id);
                entity.RemainingBalance = totalAmount - (id * entity.Amount);
                result.Add(entity);
            }
            return(result);
        }